Simple IAP System  5.0
Public Member Functions | Public Attributes | Static Public Attributes | Properties | List of all members
XsollaStore

Represents the public interface of the underlying store system for PlayFab. This is the store base class other PlayFab billing implementations are making use of. More...

Inheritance diagram for XsollaStore:

Public Member Functions

void FinishTransaction (ProductDefinition product, string transactionId)
 
void Initialize (IStoreCallback callback)
 
void Purchase (ProductDefinition product, string developerPayload)
 
void RetrieveProducts (ReadOnlyCollection< ProductDefinition > products)
 
void ConfirmPurchase ()
 
 XsollaStore ()
 Setting this store reference on initialization. More...
 
void Initialize (IStoreCallback callback)
 Initialize the instance using the specified IStoreCallback. More...
 
void RetrieveProducts (ReadOnlyCollection< ProductDefinition > products)
 Fetch the latest product metadata asynchronously with results returned via IStoreCallback. More...
 
void Purchase (ProductDefinition productDefinition, string developerPayload)
 Handle a purchase request from a user. Developer payload is provided for stores that define such a concept. More...
 
void Purchase (IAPProduct product)
 Purchase overload for virtual products, as they differ in their workflow. Virtual currency funds should be checked locally before creating the request. More...
 
void OnPurchaseStarted (PurchaseData result)
 Callback retrieved when an (real money) order on live servers has been initiated. Here the payment request for the order is being sent off, triggering native overlays. More...
 
void OnPurchaseResult ()
 Method called when the payment result should be available. The purchase still needs to be acknowledged in this method. More...
 
void ConfirmPurchase ()
 Automatic or manually triggering purchase confirmation after a payment has been made. This is so that the transaction gets finished and actually awarded in-game. More...
 
void OnPurchaseSucceeded (OrderStatus result)
 Callback from the service provider when a (real money) purchase completes successfully. More...
 
void OnPurchaseSucceeded (PurchaseData result, IAPProduct product)
 Callback from the service provider when a (virtual) purchase completes successfully. More...
 
void Consume (IAPProduct product, int amount)
 
void OnConsumeSucceeded (IAPProduct product, int amount)
 Callback from the service provider when a consume action completes successfully. More...
 
void RedeemCoupon (string code)
 
void FinishTransaction (ProductDefinition product, string transactionId)
 Called by Unity Purchasing when a transaction has been recorded. Store systems should perform any housekeeping here, such as closing transactions or consuming consumables. More...
 
void OnSetupFailed (Error error)
 Indicate that IAP is unavailable for a specific reason, such as IAP being disabled in device settings. More...
 
void OnPurchaseFailed (Error error)
 Method we are calling for any failed (real money) results in the billing interaction. More...
 
void OnVirtualPurchaseFailed (Error error)
 Method we are calling for any failed (virtual) results in the billing interaction. More...
 
void OnConsumeFailed (Error error)
 Method we are calling for any failed consume results in the billing interaction. More...
 

Public Attributes

IStoreCallback callback
 Callback for hooking into the native Unity IAP logic. More...
 
Dictionary< string, ProductDescription > products
 List of products which are declared and retrieved by the billing system. More...
 

Static Public Attributes

static int orderId
 Keeping track of the order that is currently being processed, so we can confirm and finish it later on. More...
 

Properties

static XsollaStore instance [get]
 Reference to this store class, since the user needs to confirm the purchase transaction manually in-game, thus calling the confirm method of this script. More...
 

Detailed Description

Represents the public interface of the underlying store system for PlayFab. This is the store base class other PlayFab billing implementations are making use of.

Constructor & Destructor Documentation

Setting this store reference on initialization.

Member Function Documentation

void ConfirmPurchase ( )
void ConfirmPurchase ( )

Automatic or manually triggering purchase confirmation after a payment has been made. This is so that the transaction gets finished and actually awarded in-game.

void Consume ( IAPProduct  product,
int  amount 
)

void FinishTransaction ( ProductDefinition  product,
string  transactionId 
)
void FinishTransaction ( ProductDefinition  product,
string  transactionId 
)

Called by Unity Purchasing when a transaction has been recorded. Store systems should perform any housekeeping here, such as closing transactions or consuming consumables.

void Initialize ( IStoreCallback  callback)
void Initialize ( IStoreCallback  callback)

Initialize the instance using the specified IStoreCallback.

void OnConsumeFailed ( Error  error)

Method we are calling for any failed consume results in the billing interaction.

void OnConsumeSucceeded ( IAPProduct  product,
int  amount 
)

Callback from the service provider when a consume action completes successfully.

void OnPurchaseFailed ( Error  error)

Method we are calling for any failed (real money) results in the billing interaction.

void OnPurchaseResult ( )

Method called when the payment result should be available. The purchase still needs to be acknowledged in this method.

void OnPurchaseStarted ( PurchaseData  result)

Callback retrieved when an (real money) order on live servers has been initiated. Here the payment request for the order is being sent off, triggering native overlays.

void OnPurchaseSucceeded ( OrderStatus  result)

Callback from the service provider when a (real money) purchase completes successfully.

void OnPurchaseSucceeded ( PurchaseData  result,
IAPProduct  product 
)

Callback from the service provider when a (virtual) purchase completes successfully.

void OnSetupFailed ( Error  error)

Indicate that IAP is unavailable for a specific reason, such as IAP being disabled in device settings.

void OnVirtualPurchaseFailed ( Error  error)

Method we are calling for any failed (virtual) results in the billing interaction.

void Purchase ( ProductDefinition  product,
string  developerPayload 
)
void Purchase ( ProductDefinition  productDefinition,
string  developerPayload 
)

Handle a purchase request from a user. Developer payload is provided for stores that define such a concept.

void Purchase ( IAPProduct  product)

Purchase overload for virtual products, as they differ in their workflow. Virtual currency funds should be checked locally before creating the request.

void RedeemCoupon ( string  code)

void RetrieveProducts ( ReadOnlyCollection< ProductDefinition >  products)
void RetrieveProducts ( ReadOnlyCollection< ProductDefinition >  products)

Fetch the latest product metadata asynchronously with results returned via IStoreCallback.

Member Data Documentation

IStoreCallback callback

Callback for hooking into the native Unity IAP logic.

int orderId
static

Keeping track of the order that is currently being processed, so we can confirm and finish it later on.

Dictionary<string, ProductDescription> products

List of products which are declared and retrieved by the billing system.

Property Documentation

static XsollaStore instance
staticget

Reference to this store class, since the user needs to confirm the purchase transaction manually in-game, thus calling the confirm method of this script.


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