CotC C# SDK for Unity  v1.4.0.1
Making social games is easy !
Public Member Functions | List of all members

Description

(App) Store API.

Public Member Functions

Promise< PagedList< ConfiguredProduct > > ListConfiguredProducts (int limit=30, int offset=0)
 Fetch the list of products as configured on the backoffice. Note that this doesn't include any information about pricing and so on: the external store plugin is required to do so. Note that this call returns the catalog as configured on the CotC server, which may not be exhaustive if additional products are configured on iTunes Connect but not reported to the CotC servers. More...
 
Promise< NonpagedList< PurchaseTransaction > > GetPurchaseHistory ()
 Fetches the list of transactions made by the logged in user. Only successful transactions show here. More...
 
Promise< ValidateReceiptResultValidateReceipt (StoreType storeType, string cotcProductId, float paidPrice, string paidCurrency, string receipt)
 Last step in the purchase. Validates the receipt received by a native purchase. You may have to do additional steps to close your purchase process. More...
 

Member Function Documentation

◆ GetPurchaseHistory()

Promise<NonpagedList<PurchaseTransaction> > CotcSdk.GamerStore.GetPurchaseHistory ( )

Fetches the list of transactions made by the logged in user. Only successful transactions show here.

Returns
Promise resolved when the operation has completed. The attached value describes a list of purchase transactions, without pagination functionality.

◆ ListConfiguredProducts()

Promise<PagedList<ConfiguredProduct> > CotcSdk.GamerStore.ListConfiguredProducts ( int  limit = 30,
int  offset = 0 
)

Fetch the list of products as configured on the backoffice. Note that this doesn't include any information about pricing and so on: the external store plugin is required to do so. Note that this call returns the catalog as configured on the CotC server, which may not be exhaustive if additional products are configured on iTunes Connect but not reported to the CotC servers.

Parameters
limitThe maximum number of results to return per page.
offsetNumber of the first result.
Returns
Promise resolved when the operation has completed. The attached value describes a list of products, with pagination functionality.

◆ ValidateReceipt()

Promise<ValidateReceiptResult> CotcSdk.GamerStore.ValidateReceipt ( StoreType  storeType,
string  cotcProductId,
float  paidPrice,
string  paidCurrency,
string  receipt 
)

Last step in the purchase. Validates the receipt received by a native purchase. You may have to do additional steps to close your purchase process.

Returns
Promise indicating whether the recceipt was validated properly. In case of exception, you can inspect why the receipt failed to verify.
Parameters
storeTypeType of Store, should be provided by the store plugin. Valid are appstore, macstore, googleplay.
cotcProductIdID of the product purchased (as configured on the backoffice).
paidPricePaid price in units.
paidCurrencyCurrency of paid price (ISO code).
receiptReceipt string, dependent on the store type.