Kongregate Mobile Unity API
Public Member Functions | List of all members
Kongregate.IMtx Interface Reference

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...
 

Detailed Description

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.

Member Function Documentation

◆ HasItem()

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.

Parameters
identifierThe Kongregate item identifier
Returns
True if the user has the specified identifier in their inventor

◆ ReceiptVerificationStatus()

string Kongregate.IMtx.ReceiptVerificationStatus ( string  transactionIdentifier)
Deprecated:
please use a custom or 3rd party receipt validation service
Parameters
transactionIdentifierThe transaction to check the status of
Returns
the status of the verification check

◆ RequestUserItemList()

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.

◆ VerifyGoogleReceipt()

void Kongregate.IMtx.VerifyGoogleReceipt ( string  receipt,
string  signature 
)
Deprecated:
please use a custom or 3rd party receipt validation service
Parameters
receiptThe full JSON receipt for the purchase
signatureThe data signature included with the purchase response.

◆ VerifyTransactionId()

void Kongregate.IMtx.VerifyTransactionId ( string  transactionIdentifier)
Deprecated:
please use a custom or 3rd party receipt validation service
Parameters
transactionIdentifierThe transaction id to verify

The documentation for this interface was generated from the following file: