简体   繁体   English

在 Google In App Purchases 中取消用户订阅

[英]Cancellation of User Subscription in Google In App Purchases

I want non auto renewable subscriptions in Google In app purchases.我想在 Google In App 购买中使用不可自动更新的订阅。 According to Google Docs, In App subscriptions are auto renewable which means they will be renewed after that specified time.根据 Google Docs,应用内订阅是自动续订的,这意味着它们将在指定时间后续订。 I want non auto renewable subscriptions.我想要非自动更新订阅。 So What I will do is canceling user subscription from my system.所以我要做的是从我的系统中取消用户订阅。 According to Google docs, If user subscription is canceled, it will remains valid until its expiration time.根据谷歌文档,如果用户订阅被取消,它将保持有效直到到期时间。 I have two options我有两个选择

  1. Cancel user subscription when he subscribed as this subscription will remain valid until its expiry time.订阅时取消用户订阅,因为此订阅将在到期前一直有效。
  2. Setup a scheduler which will cancel user subscription before it is renewed.设置一个调度程序,它将在续订之前取消用户订阅。

According to docs, there is parameter in response cancelReason which can be either 0,1 or 2根据文档,响应cancelReason有一个参数可以是0,1或2

The reason why a subscription was cancelled or is not auto-renewing.订阅被取消或未自动续订的原因。 Possible values are可能的值为

0: User cancelled the subscription 0:用户取消订阅

1: Subscription was cancelled by the system, for example because of a billing problem 1:订阅被系统取消,例如因为计费问题

2: Subscription was replaced with a new subscription 2:订阅被新订阅取代

I want to ask, if I cancel subscription (which will be considered as subscription canceled by system) when user just subscribed, will it be valid until its expiry time?我想问一下,如果我在用户刚刚订阅的时候取消订阅(会被视为系统取消订阅),是否有效到到期? As there is no such description in Google API Docs.因为在 Google API Docs 中没有这样的描述。 As for method 2 of cancellation, I had to setup a scheduler on the system which is lengthy task.至于取消的方法2,我必须在系统上设置一个调度程序,这是一项冗长的任务。

The whole point of a subscription is that it renews.订阅的全部意义在于它会更新。

If you want to take a payment for a specific time period but do not want it to renew then just use in-app purchasing.如果您想在特定时间段内付款但不想续订,则只需使用应用内购买。

Have your users buy an in-app product and have that product "expire" after a set time period.让您的用户购买应用内产品并让该产品在设定的时间段后“过期”。 You can query from the system the purchase date etc. then just use the in-app " consume " method after that time has passed.您可以从系统中查询购买日期等,然后在该时间过后使用应用程序内的“ 消费”方法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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