|
|
|
|
|
inAppConsumeProduct (Function) In french: inAppConsommeProduit Used to consume, in an application, a product that was previously purchased by the user. Once consumed, the product will be made available for another purchase. Reminder Under Android, it is not possible to buy a product that the user has already purchased. The product must be consumed before it can be purchased again.
inAppPurchaseProduct(MonProduit, AchatProduit)
PROCEDURE AchatProduit(bSuccès is boolean, Produit is inAppProduct, IDAchat)
IF NOT bSuccès THEN
ToastDisplay(ErrorInfo())
ELSE
inAppConsumeProduct(Produit, IDAchat, ConsommationProduit)
END
PROCEDURE ConsommationProduit(bSuccès is boolean)
IF NOT bSuccès THEN
ToastDisplay(ErrorInfo())
ELSE
...
END
Syntax
<Result> = inAppConsumeProduct(<Product to consume> , <Purchase identifier> , <WLanguage procedure>)
<Result>: Boolean - True if the request for product consumption was performed,
- False otherwise. To get more details on the error, use ErrorInfo.
<Product to consume>: Character string or inAppProduct variable - Identifier of the product to the consume,
- Name of the inAppProduct variable corresponding to the product to consume.
<Purchase identifier>: Character string Purchase identifier of product to the consume. This identifier is received when purchasing a product with inAppPurchaseProduct. It can also be retrieved by inAppListPurchase. <WLanguage procedure>: Procedure name Name of the WLanguage procedure (also called "callback") executed when the response to the product consumption request is received. This procedure has the following format:
PROCEDURE <Procedure Name>(<Success> is boolean) <Success> is boolean: - True if the product was consumed,
- False otherwise. To get more details on the error, use ErrorInfo before any other call to a WLanguage function (this would reinitialize the error).
Remarks - inAppListPurchase is used to retrieve the products purchased by the user and not consumed yet.
- inAppConsumeProduct has no effect if it is run from the Android simulator or emulator.
- You cannot consume a subscription.
Component: wd300android.jar
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|