Interface IStoreController
Used by Applications to control Unity Purchasing.
Namespace: UnityEngine .Purchasing
Assembly: solution.dll
Syntax
public interface IStoreController
Properties
products
Gets the collection of products in the store.
Declaration
ProductCollection products { get; }
Property Value
Type | Description |
---|---|
Product |
The product collection. |
Methods
ConfirmPendingPurchase(Product)
Where an Application returned ProcessingResult.Pending from IStoreListener.ProcessPurchase(), Applications should call this method when processing completes.
Declaration
void ConfirmPendingPurchase(Product product)
Parameters
Type | Name | Description |
---|---|---|
Product | product | The product for which its pending purchase it to be confirmed. |
FetchAdditionalProducts(HashSet<ProductDefinition>, Action, Action<InitializationFailureReason, string>)
Fetch additional products from the controlled store.
Declaration
void FetchAdditionalProducts(HashSet<ProductDefinition> additionalProducts, Action successCallback, Action<InitializationFailureReason, string> failCallback)
Parameters
Type | Name | Description |
---|---|---|
Hash |
additionalProducts | The set of product definitions to be fetched. |
Action | successCallback | The event triggered on a successful fetch. |
Action<Initialization |
failCallback | The event triggered on a failed fetch. Contains the FailureReason and an optional error message. |
FetchAdditionalProducts(HashSet<ProductDefinition>, Action, Action<InitializationFailureReason>)
Fetch additional products from the controlled store.
Declaration
[Obsolete]
void FetchAdditionalProducts(HashSet<ProductDefinition> additionalProducts, Action successCallback, Action<InitializationFailureReason> failCallback)
Parameters
Type | Name | Description |
---|---|---|
Hash |
additionalProducts | The set of product definitions to be fetched. |
Action | successCallback | The event triggered on a successful fetch. |
Action<Initialization |
failCallback | The event triggered on a failed fetch. |
InitiatePurchase(string)
Initiate a purchase from the controlled store
Declaration
void InitiatePurchase(string productId)
Parameters
Type | Name | Description |
---|---|---|
string | productId | The id of the product to be purchased. |
InitiatePurchase(string, string)
Initiate a purchase from the controlled store.
Declaration
void InitiatePurchase(string productId, string payload)
Parameters
Type | Name | Description |
---|---|---|
string | productId | The id of the product to be purchased. |
string | payload | The developer payload provided for certain stores that define such a concept (ex: Google Play). |
InitiatePurchase(Product)
Initiate a purchase from the controlled store.
Declaration
void InitiatePurchase(Product product)
Parameters
Type | Name | Description |
---|---|---|
Product | product | The product to be purchased. |
InitiatePurchase(Product, string)
Initiate a purchase from the controlled store.
Declaration
void InitiatePurchase(Product product, string payload)