跟踪杂志的自动续订订阅
我正在尝试实现自动续订订阅,但有些事情对我来说并不是很清楚。
例如,如果我有一个类似杂志的应用程序,并且想要跟踪订阅,即使它们现在无效,我是否必须将收据保存在我的应用程序中(例如核心数据)?我必须跟踪它们,因为即使订阅无效,我也必须让用户访问旧问题。因此,它的状态代码要么是 0,要么是 21006。
另一个问题是,为什么 Apple 使用 21006 状态代码来取消由 Apple 取消的订阅,例如,有人错误地进行了订阅。当我只知道现在无效时,如何确定是否发生了这种情况?它也可能因超出订阅期限而失效。我从 iTunes U 上的 WWDC 2011 视频中获得了此信息。
如有任何帮助,我们将不胜感激;-)
I'm trying to implement the auto-renewable subscriptions but something is not really clear for me.
If I have for example a magazine like app and want to track the subscriptions even if they are invalid now, do I have to save the receipts in my app (e.g. Core Data)? I have to track them all because I have to give the user access to old issues even if the subscription is invalid. So either it has the status code 0 oder 21006.
Another question is why Apple uses the 21006 status code for canceled subscriptions that were canceled by Apple because for example somebody mistakenly made a subscription. How can I determine if that happend when I only know that it's invalid now? It could also be invalidated because it is out of the subscription period. I have this Information from the WWDC 2011 Video on iTunes U.
Any help would be appreciated ;-)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Apple 建议您在服务器上存储和验证所有收据,而不一定在应用程序上。要检查某人的订阅状态,只需验证您为该用户存储的任何收据即可。 (它必须是来自同一订阅系列的收据)然后 Apple 将回复该订阅中的最新收据。您可以使用此信息向用户提供该收据到期日之前的所有杂志。如果您愿意,您可以在应用程序上完成这一切,但 Apple 不鼓励这样做,因为您必须将 iTunes 验证
秘密
存储在应用程序本身中。至于你的第二个问题,我的假设是苹果认为退款是不正常的。所以他们不想为此做出任何让步。他们不想让它变得更容易或自动化。这就是为什么您没有获得表示“用户的订阅因退款而被取消”的特殊代码。我希望这种情况很少见,仅仅向退款用户免费提供杂志文章不会让您破产。 (并且由于您的收据验证将显示他们的帐户没有续订,因此您不必给他们新的问题)。
Apple recommends you store and verify all receipts on your server, not necessarily on the app. To check on the status of someones subscription, just verify any receipt you have stored for that user. (it must be a receipt from the same subscription family) Then Apple will respond with the latest receipt in that subscription. You can use this information to provide the user with all issues of the magazine up until the expiration date of that receipt. You can do this all on the app if you want, but Apple discourages it since you'd have to store your iTunes verification
secret
in the app itself.As for your second question, my assumption is that Apple sees refunds as outside-the-norm. So they don't want to make any concessions for it. They don't want to make it easier or automated. That's why you don't get a special code that means 'the user's subscription was cancelled due to refund.' I would hope that this is rare enough that simply providing the magazine articles for free to refunded users, won't make you broke. (and since your receipt verification will show that their account isn't renewing, you don't have to give them new issues).
Apple 建议您在服务器上存储并验证所有收据。
(或)
RMStore 委托事务持久性,并提供两个可选的参考实现,用于将事务存储在 Keychain 或 NSUserDefaults 中。您可以实现交易,使用库提供的参考实现,或者在非消耗品和自动更新订阅的情况下,直接从收据获取交易。
刷新收据通知(仅限 iOS 7+)
收据验证
RMStore 默认不执行收据验证,但提供参考实现。您可以实现自己的自定义验证或使用库提供的参考验证器。
这两个选项概述如下。欲了解更多信息,请查看 wiki。
参考验证器
RMStore 通过 RMStoreAppReceiptVerificator(适用于 iOS 7 或更高版本)和 RMStoreTransactionReceiptVerificator(适用于 iOS 6 或更低版本)提供收据验证。要使用其中任何一个,请将 RMStore/Optional 中的相应文件添加到您的项目中,并在启动时设置验证器委托 (receiptVerificator)。例如:
有关更多详细信息,请点击以下链接。
iOS 应用内购买变得简单
用于应用内购买的轻量级 iOS 库
欢迎。
希望对您有所帮助............
Apple recommends you store and verify all receipts on your server.
(OR)
RMStore delegates transaction persistence and provides two optional reference implementations for storing transactions in the Keychain or in NSUserDefaults. You can implement your transaction, use the reference implementations provided by the library or, in the case of non-consumables and auto-renewable subscriptions, get the transactions directly from the receipt.
Refresh receipt notifications (iOS 7+ only)
Receipt verification
RMStore doesn't perform receipt verification by default but provides reference implementations. You can implement your own custom verification or use the reference verificators provided by the library.
Both options are outlined below. For more info, check out the wiki.
Reference verificators
RMStore provides receipt verification via RMStoreAppReceiptVerificator (for iOS 7 or higher) andRMStoreTransactionReceiptVerificator (for iOS 6 or lower). To use any of them, add the corresponding files from RMStore/Optional into your project and set the verificator delegate (receiptVerificator) at startup. For example:
For more details follow the below links.
iOS In-App purchases made easy
A lightweight iOS library for In-App Purchases
Welcome.
Hope it will help you.............