简体   繁体   中英

Android Inapp purchase Subscription verification

How should one verify that the subscribed item he haas buyied using google play services,is still valid I have buyied a magazine with monthly subscription , i got the : { "orderId":" **", "packageName":"** ", "productId":"77", "purchaseTime": **, "purchaseState":0, "purchaseToken":"** " }

now how to know next time whether i have buyied the item without calling playservices. Is there any api to check the subscription is still valid.

The google developer's guide sais:

purchaseState: The purchase state of the order. Possible values are 0 (purchased), 1 (canceled), or 2 (refunded).

Here is the link .

So yout subscription is still active and you will pay again, if you do not cancel it in time.

The purchaseTime is the time you bought the item - made the subscription. In Google Play you can see if it is a monthly or annualy subscription. Use there infos to calculate the time you pay for it the next time.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM