[英]How to determine if a in-app subscription on Google Play has been renewed?
The following documentation describes the result from querying the Google Play API about a subscription: https://developers.google.com/android-publisher/api-ref/purchases/subscriptions#resource-representations 以下文档描述了查询Google Play API的订阅结果: https : //developers.google.com/android-publisher/api-ref/purchases/subscriptions#resource-representations
However, if a user cancels a subscription when there is still time left in the current period, will the cancelReason be empty or will it be 0? 但是,如果用户在当前期间还有剩余时间取消订阅,则cancelReason为空还是为0? In other words, will the cancelReason flag stay empty until there is no time left in the current period, or will it change immediately on cancellation?
换句话说,cancelReason标志会一直保持为空,直到当前期间没有剩余时间为止,还是在取消时立即更改?
In other words, will the cancelReason flag stay empty until there is no time left in the current period, or will it change immediately on cancellation?
换句话说,cancelReason标志会一直保持为空,直到当前期间没有剩余时间为止,还是在取消时立即更改?
I think, the answer is " it doesn't matter ", because documentation says : 我认为答案是“ 没关系 ”,因为文档显示 :
Query for subscription status only at expiration — Once your server has retrieved the expiration date of subscription tokens, it should not query the Google Play servers for the subscription status again until the subscription is reaching or has passed the expiration date .
仅在到期时查询订阅状态-您的服务器检索到订阅令牌的到期日期后,就不应再在Google Play服务器上查询订阅状态, 直到订阅达到或已超过到期日期为止 。 Typically, your servers would run a batch query each day to check the status of expiring subscriptions, then update the database.
通常,您的服务器每天都会运行一个批查询,以检查即将到期的订阅状态,然后更新数据库。
In fact they can change it immediatly, but they don't guarantee this until the end of expiration time. 实际上,他们可以立即对其进行更改,但是直到到期时间结束,他们才保证这样做。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.