Kongregate Mobile Unity API
|
Interface for transaction APIs including Kongregate micro-transactions, user item management, and App Store reciept validation. More...
Public Member Functions | |
void | VerifyTransactionId (string transactionIdentifier) |
void | VerifyGoogleReceipt (string receipt, string signature) |
string | ReceiptVerificationStatus (string transactionIdentifier) |
void | RequestUserItemList () |
Call this function to request the user's inventory from the remote server. More... | |
bool | HasItem (string identifier) |
Used to check if a user owns an item with the given identifier. More... | |
Interface for transaction APIs including Kongregate micro-transactions, user item management, and App Store reciept validation.
This API can be used to query the server to determine if a Kongregate user owns a particular item. Currently, the functionality provided by this API is used for cross-promotion between games. For example, a bonus item in one game can be awarded by obtaining a badge in another.
bool Kongregate.IMtx.HasItem | ( | string | identifier | ) |
Used to check if a user owns an item with the given identifier.
Only valid after a call to requestUserItemList generates the KONGREGATE_EVENT_USER_INVENTORY event. It is recommended you persist the value of this call to disk once it returns true so that repeated requests to the server don't need to be made.
identifier | The Kongregate item identifier |
string Kongregate.IMtx.ReceiptVerificationStatus | ( | string | transactionIdentifier | ) |
transactionIdentifier | The transaction to check the status of |
void Kongregate.IMtx.RequestUserItemList | ( | ) |
Call this function to request the user's inventory from the remote server.
Once the list of items has been retrieved, a KONGREGATE_EVENT_USER_INVENTORY event will be broadcast, at which point you can call hasItem: to determine if the user owns a specific item.
void Kongregate.IMtx.VerifyGoogleReceipt | ( | string | receipt, |
string | signature | ||
) |
receipt | The full JSON receipt for the purchase |
signature | The data signature included with the purchase response. |
void Kongregate.IMtx.VerifyTransactionId | ( | string | transactionIdentifier | ) |
transactionIdentifier | The transaction id to verify |