如何检查In App Purchase Auto Renewable Subscription是有效的 [英] How to check In App Purchase Auto Renewable Subscription is valid

查看:271
本文介绍了如何检查In App Purchase Auto Renewable Subscription是有效的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻求使用In App购买实施新的Auto Renewable订阅,但我不确定如何或何时检查用户当前是否已订阅。我的理解是,当用户最初订阅应用程序时,可以使用购买日期和订阅日期来计算他们的订阅将持续多长时间。这个日期过后会发生什么?我们如何检查用户是否已自动续订或取消?

I'm looking to implement the new Auto Renewable subscriptions using In App purchase but I am unsure how or when to check if the user is currently subscribed. My understanding is that when the user initially subscribes the app can use the purchase date along with the subscription date to calculate how long their subscription would last. What happens after this date has passed? How do we check if the user has auto renewed or cancelled?

如果我使用 restoreCompletedTransactions 来获取交易,每次续订的收据将提示用户输入其iTunes密码。这是否意味着,如果他们购买了7天的订阅,他们将不得不每7天输入一次密码,当应用程序检查订阅是否仍然有效时?

If I use restoreCompletedTransactions to get a transaction and receipt for each renewal the user will be prompted to enter their iTunes password. Does this mean that if they have bought a 7 day subscription they will have to enter their password every 7 days when the app checks if the subscription is still valid?

推荐答案

查看以下文档:

http://developer.apple.com/library/ios/#documentation/NetworkingInternet /Conceptual/StoreKitGuide/VerifyingStoreReceipts/VerifyingStoreReceipts.html#//apple_ref/doc/uid/TP40008267-CH104-SW1

如果你想查看它从网络服务器,你ping他们的API,它返回自动更新订阅的状态和有关上次付款的信息。

IF you want to check on it from a web server, you ping their API and it returns the status of the auto-renewable subscription and info about the last payment.

如果你在设备上,那么你可能要调用restoreCompletedTransactions,我猜要密码。

If you are on the device then you probably have to call restoreCompletedTransactions which I guess asks for the password.

我没有看到任何其他方法。我想从设备上你可以通过联系服务器端使用的相同Web服务来验证订阅?我不知道它的优点和缺点。

I don't see any other method. I suppose from the device you could verify the subscription by contacting the same web service used on the server side? I don't know how the pros and cons of that.

这篇关于如何检查In App Purchase Auto Renewable Subscription是有效的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆