简体   繁体   English

如何确定是否已续订Google Play上的应用内订阅?

[英]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.

相关问题 Google Play添加了对测试应用内订阅目的的支持吗? - Google Play has added support for testing in-app subscription purposes? 我怎么知道该用户刚刚续订了 google play 订阅? - How can I know that user just renewed a google play subscription? Google Play应用内结算订阅回调 - Google play in-app billing subscription callbacks 您如何检测用户现有订阅的价格是否发生了变化(Google Play 应用内购买)? - How do you detect if a user's existing subscription's price has changed (Google Play in-app purchase)? Google Play 订阅:检测订阅是否在 android 中自动续订 - Google Play Subscription: Detect if subscription is auto renewed in android 使用 Google Play 结算,是否可以等到确认购买后才授予应用内购买的权利? - With Google Play Billing, is it okay to wait with granting entitlement to an in-app purchase until after the purchase has been acknowledged? 自动续订订阅应用内结算Google Play - auto-renew subscription in-app billing google play 更改Google Play商店应用内订阅价格 - Changing subscription price on Google Play store in-app 如何确定用户是否取消Google Play订阅? - How to determine if user cancels Google Play subscription? 实施Google应用内订阅 - Implementing google in-app subscription
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM