使用旧令牌在 Google Play Developer API 中查询 Purchases.subscriptions
Using an old token to query Purchases.subscriptions in the Google Play Developer API
假设我保存了用户通过 Google Play 购买自动续订订阅时的令牌。当该订阅自动续订时,我是否仍可以使用那个较旧的初始令牌来获取该订阅的当前状态(通过 Purchases.subscriptions: get)?
是的,你可以。该令牌不会更改。您将在您的请求中传递此令牌,以查明订阅是否已续订。
确保您没有丢失该令牌,否则弄清楚用户是否已续订将是一场噩梦。
当用户取消自动续订并在当前期限结束前重新开始订阅(从 Play 商店重新打开自动续订)时,购买令牌会发生变化,upgrades/downgrades,购买新订阅后旧订阅失效 + 在某些情况下,当订单被暂停并且订阅被恢复时。几乎可以肯定 Purchases.subscriptions:在这种情况下使用旧令牌时,获取响应将不包含新收据。
Resignup refers to when a user subscribes, cancels their subscription, and then re-subscribes before the original subscription has expired. Although they have not lost entitlement and the new subscription will be the same as the previous one, they will go through another purchase flow as they are committing to future payments. They will receive a new purchase token and the linkedPurchaseToken field will be set, as in the case of an upgrade or downgrade.
您可以在 Medium post 此处阅读更多内容。
假设我保存了用户通过 Google Play 购买自动续订订阅时的令牌。当该订阅自动续订时,我是否仍可以使用那个较旧的初始令牌来获取该订阅的当前状态(通过 Purchases.subscriptions: get)?
是的,你可以。该令牌不会更改。您将在您的请求中传递此令牌,以查明订阅是否已续订。 确保您没有丢失该令牌,否则弄清楚用户是否已续订将是一场噩梦。
当用户取消自动续订并在当前期限结束前重新开始订阅(从 Play 商店重新打开自动续订)时,购买令牌会发生变化,upgrades/downgrades,购买新订阅后旧订阅失效 + 在某些情况下,当订单被暂停并且订阅被恢复时。几乎可以肯定 Purchases.subscriptions:在这种情况下使用旧令牌时,获取响应将不包含新收据。
Resignup refers to when a user subscribes, cancels their subscription, and then re-subscribes before the original subscription has expired. Although they have not lost entitlement and the new subscription will be the same as the previous one, they will go through another purchase flow as they are committing to future payments. They will receive a new purchase token and the linkedPurchaseToken field will be set, as in the case of an upgrade or downgrade.
您可以在 Medium post 此处阅读更多内容。