Class SubscriptionInfoHelper
Use to query in-app purchasing subscription product information, and upgrade subscription products. Supports the Apple App Store, Google Play store. Note expiration dates may become invalid after updating subscriptions between two types of duration.
Inherited Members
Namespace: UnityEngine.Purchasing
Assembly: Unity.Purchasing.dll
Syntax
public class SubscriptionInfoHelper
Constructors
SubscriptionInfoHelper(string, string, string)
Construct an object that allows inspection of a subscription product.
Declaration
public SubscriptionInfoHelper(string receipt, string id, string introJson)
Parameters
| Type | Name | Description |
|---|---|---|
| string | receipt | A Unity IAP unified receipt from |
| string | id | A product identifier. |
| string | introJson | From |
See Also
SubscriptionInfoHelper(Product, string)
Construct an object that allows inspection of a subscription product.
Declaration
public SubscriptionInfoHelper(Product product, string introJson)
Parameters
| Type | Name | Description |
|---|---|---|
| Product | product | Subscription to be inspected |
| string | introJson | From |
See Also
Methods
GetSubscriptionInfo()
Convert my Product into a SubscriptionInfo.
My Product.receipt must have a "Payload" JSON key containing supported native app store
information, which will be converted here.
Declaration
public SubscriptionInfo GetSubscriptionInfo()
Returns
| Type | Description |
|---|---|
| SubscriptionInfo | Returns the SubscriptionInfo |
Exceptions
| Type | Condition |
|---|---|
| NullProductIdException | My Product must have a non-null product identifier |
| StoreSubscriptionInfoNotSupportedException | A supported app store must be used as my product |
| NullReceiptException | My product must have a receipt |
| InvalidProductTypeException | For non-subscription product types |