Simple IAP System  4.3
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
PlayfabStore

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 PlayfabStore:
PlayfabFacebookStore PlayfabPayPalStore PlayfabSteamStore

Public Member Functions

virtual void Initialize (IStoreCallback callback)
 Initialize the instance using the specified IStoreCallback. More...
 
virtual void RetrieveProducts (ReadOnlyCollection< ProductDefinition > products)
 Fetch the latest product metadata asynchronously with results returned via IStoreCallback. More...
 
virtual void Purchase (ProductDefinition product, string developerPayload)
 Handle a purchase request from a user. Developer payload is provided for stores that define such a concept. More...
 
void Purchase (IAPObject obj)
 Purchase overload for virtual products, as they differ in their workflow on PlayFab. Also the virtual currency funds are checked locally before forwarding the request to PlayFab. More...
 
virtual void OnPurchaseStarted (StartPurchaseResult result)
 Callback retrieved when an (real money) order on PlayFab's servers has been initiated. Here the payment request for the order is being sent off, triggering native overlays. More...
 
virtual void OnPurchaseResult (PayForPurchaseResult result)
 Callback retrieved when the payment result is received from PlayFab's servers. The purchase still needs to be acknowledged in this method. More...
 
void OnPurchaseSucceeded (ConfirmPurchaseResult result)
 Callback from the billing system when a (real money) purchase completes successfully. More...
 
void OnPurchaseSucceeded (PurchaseItemResult result)
 Callback from the billing system when a (virtual) purchase completes successfully. More...
 
virtual 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 (PlayFabError error)
 Indicate that IAP is unavailable for a specific reason, such as IAP being disabled in device settings. More...
 
void OnPurchaseFailed (PlayFabError error)
 Method we are calling for any failed (real money) results in the billing interaction. More...
 
void OnVirtualPurchaseFailed (PlayFabError error)
 Method we are calling for any failed (virtual) 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...
 
string storeId = "StoreName"
 Declaring the store name used in Unity IAP for product store identifiers. More...
 

Static Public Attributes

static string orderId
 Keeping track of the order that is currently being processed, so we can confirm and finish it later on. 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.

Member Function Documentation

virtual void FinishTransaction ( ProductDefinition  product,
string  transactionId 
)
virtual

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

virtual void Initialize ( IStoreCallback  callback)
virtual

Initialize the instance using the specified IStoreCallback.

Reimplemented in PlayfabPayPalStore, PlayfabSteamStore, and PlayfabFacebookStore.

void OnPurchaseFailed ( PlayFabError  error)

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

virtual void OnPurchaseResult ( PayForPurchaseResult  result)
virtual

Callback retrieved when the payment result is received from PlayFab's servers. The purchase still needs to be acknowledged in this method.

Reimplemented in PlayfabPayPalStore, and PlayfabSteamStore.

virtual void OnPurchaseStarted ( StartPurchaseResult  result)
virtual

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

Reimplemented in PlayfabFacebookStore.

void OnPurchaseSucceeded ( ConfirmPurchaseResult  result)

Callback from the billing system when a (real money) purchase completes successfully.

void OnPurchaseSucceeded ( PurchaseItemResult  result)

Callback from the billing system when a (virtual) purchase completes successfully.

void OnSetupFailed ( PlayFabError  error)

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

void OnVirtualPurchaseFailed ( PlayFabError  error)

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

virtual void Purchase ( ProductDefinition  product,
string  developerPayload 
)
virtual

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

Reimplemented in PlayfabPayPalStore.

void Purchase ( IAPObject  obj)

Purchase overload for virtual products, as they differ in their workflow on PlayFab. Also the virtual currency funds are checked locally before forwarding the request to PlayFab.

virtual void RetrieveProducts ( ReadOnlyCollection< ProductDefinition >  products)
virtual

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

Reimplemented in PlayfabPayPalStore.

Member Data Documentation

IStoreCallback callback

Callback for hooking into the native Unity IAP logic.

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

string storeId = "StoreName"

Declaring the store name used in Unity IAP for product store identifiers.


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