|
|
|
|
|
- Special cases
- Managing subscriptions
inAppListPurchase (Function) In french: inAppListeAchat Returns the list: - of application products purchased by the user and not consumed.
- of active subscriptions for the user.
inAppListPurchase(ListeAchat, inAppPurchaseID)
PROCEDURE ListeAchat(bSuccès is boolean, sListeAchat is string)
IF NOT bSuccès THEN
ToastDisplay(ErrorInfo())
ELSE
FOR EACH STRING sInfoAchat OF sListeAchat SEPARATED BY CR
sIDProduit is string = ExtractString(sInfoAchat, 1, TAB)
sIDAchat is string = ExtractString(sInfoAchat, 2, TAB)
IF sIDProduit = "ID_PRODUIT" THEN
inAppConsumeProduct(sIDProduit, ConsommationProduit)
END
END
END
END
PROCEDURE ConsommationProduit(nSuccès is boolean)
IF NOT bSuccès THEN
ToastDisplay(ErrorInfo())
ELSE
...
END
END
Syntax
<Result> = inAppListPurchase(<Procedure> [, <Type of information>])
<Result>: Boolean - True if the purchase list retrieval request has been carried out,
- False otherwise. To get more details on the error, use ErrorInfo.
<Procedure>: Character string Name of the WLanguage procedure ("callback") executed when the list of purchases is received. For more details on this procedure, see Parameters of the procedure used by inAppListPurchase. <Type of information>: Optional Integer constant Additional information that will be returned for each listed purchase (in addition to the product identifier): | | inAppAutoRenewal | - 1 if the subscription is automatically renewed at the next invoicing date.
- 0 if the subscription was canceled by the user or if the purchase does not correspond to a subscription.
| inAppOrderID | Number of the order corresponding to the purchase. | inAppPurchaseDate | Purchase date in YYYYMMDD format. In the case of a subscription: subscription date. For renewals: initial subscription date (not renewal date). | inAppPurchaseID | Identifier of purchase. | inAppSubscriptionEndDate | End date of subscription in YYYYMMDD format. |
Remarks Special cases When a product is consumed (inAppConsumeProduct), it is no longer displayed in the list returned by inAppListPurchase and it can be purchased again by the user (inAppPurchaseProduct). - inAppListPurchase has no effect if it is run from the simulator or emulator.
Component: wd300android.aar
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|