Class SubscriptionInfoHelper
Use to query in-app purchasing subscription product information, and upgrade subscription products. Supports the Apple App Store, Google Play store, and Amazon AppStore. Note Amazon support offers no subscription duration information. 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 |
---|---|
Subscription |
Exceptions
Type | Condition |
---|---|
Null |
My Product must have a non-null product identifier |
Store |
A supported app store must be used as my product |
Null |
My product must have a receipt |
Invalid |
For non-subscription product types |