Difference between revisions of "FBInstant.payments.consumePurchaseAsync"

 
Line 22: Line 22:
 
end)
 
end)
 
<br/></source>
 
<br/></source>
 +
 +
{{FBInstant.payments}}

Latest revision as of 19:42, 25 March 2020


Available since: Gideros 2018.3
Class: Payments

Description


Consumes a specific purchase belonging to the current player. Before provisioning a product's effects to the player, the game should request the consumption of the purchased product. Once the purchase is successfully consumed, the game should immediately provide the player with the effects of their purchase.

 FBInstant.payments.consumePurchaseAsync(purchaseToken,callback)

Parameters

purchaseToken: (string) The purchase token of the purchase that should be consumed.
callback: (function) A function that will be called with two arguments: True when the purchase has been consumed successfully otherwise the operation failed, and an error code if the function failed.

Examples

Example

FBInstant.payments.consumePurchaseAsync("54321", function(result,error)
    if result then
		print("Consumed!")
	end
end)
<br/>