应用程序购买 iPhone 中的自动续订验证
我正在开发一个应用程序,在该应用程序中我已经实现了应用程序内购买,并且还成功验证了收据。
我已经完成了自动续订订阅,我想知道如何检查用户订阅是否有效?
为了验证收据,我需要 SKPaymentTransaction 的收据。所以我的问题是,当用户返回我的应用程序时,我如何检查他仍然有订阅或订阅已过期。
或者简单地说哪种方法可以在加载我的视图时为我提供 SKPaymentTransaction 的用户交易属性,以便我可以验证收据。
提前致谢, 萨蒂什
I am working on one app in which i have implemented the in app purchase and also successfully verified the receipt.
I have done the auto renewal subscription in which I want to know how I can check the user subscription is active or not?
In order to verify the receipt i need the receipt from the SKPaymentTransaction. So my question is that how could I can check when user returns to my app that he still has subscription or it expired.
or simply which method can give me the user transaction property of SKPaymentTransaction on load of my view so i can verify the receipt.
Thanks in advance,
Satish
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
最后我通过以下方式做到了...
当用户第一次订阅订阅时,我将交易收据保存在 userdefaults 中,当稍后我需要检查订阅激活时,我使用该收据告诉我最近的到期日。
希望这会有所帮助...
Finally I did it in the following way...
I save the transaction receipt in userdefaults when user first time subscribes to the subscription and when later I need to check for the subscription activation I use that receipt which tells me the latest expiry day..
Hope this will help...