应用程序内购买在 iPhone 应用程序之外完成
我正在实施应用内购买订阅模型。
假设我有一个 iPhone 3 用户,他从我的应用程序开始整个购买过程,然后退出应用程序,然后继续在我的应用程序之外填写他的应用程序商店凭据,直到他完成购买。
我的应用程序如何知道交易是在启动时进行的? 另外,如果我确实收到此信息,我如何判断它不是旧订阅期(已过期)的旧购买?
最后但并非最不重要的一点是,如果设备支持多任务处理并且购买已完成,而我的应用程序处于后台,我将如何在返回前台时收到通知?
谢谢罗伊
I am implementing an in app purchase subscription model.
Let's say I have an iPhone 3 user which starts the whole purchase process from my application and then exits the application only to continue and fill his app store credentials outside of my app until he is done with the purchase.
How can my app know that the transaction was made upon launch?
Also in case I do get this info how can I tell it is not an old purchase for an old subscription period which has already expired?
And last but not least in case the device supports multitasking and the purchase was finished while my app was in the background how will I get notified upon returning to the foreground?
Thanks
Roi
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您是否阅读过 Apple 的文档 - 应用内购买编程指南?我相信它可以回答您所有的问题。
Have you read Apple's Documentation - In App Purchase Programming Guide? I believe it answers all your questions.
- (void)recordTransaction:(SKPaymentTransaction *)transaction 方法可以解决您的大部分问题。
一旦你正确地实现了这个方法,你只需要检查应用内购买是否完成即可。剩下的由支付方式来处理。
谢谢
The - (void)recordTransaction:(SKPaymentTransaction *)transaction method takes care of most of your pains.
Once you properly implement this method,you would just have to check whether the inApp purchase is done.Rest is taken care of by the payment methods.
Thanks