GetInAppPurchaseToken

Description

On Android this returns a unique token for the last purchase of the given item, this can be sent to your server to check the validity of the purchase with Google, and to distinguish between different instances of a consumable purchase. You should only reward the user once per token for consumable purchases, it is recommended that you store a list of past tokens on a server so you can detect any token reuse, which could be used to cheat your system. Once you have rewarded the user for a consumable purchase you must call InAppPurchaseResetPurchase with the most recent token to allow it to be purchased again.

On iOS this returns a transaction ID that changes with every purchase the user makes. It can't be used to check with Apple if a transaction was genuine but it can be used to distinguish between multiple purchases of a consumable item. You can pass this token to InAppPurchaseResetPurchase to reset the purchase state to 0 but on iOS this is not required.

This only works on Android and iOS, other platforms will return an empty string

Definition

string GetInAppPurchaseToken(int iID)

Parameters