且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何检查In App Purchase Auto Renewable Subscription是有效的

更新时间:2023-12-03 17:15:10

查看以下文档:

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.