何时在服务器产品模型中调用 SKPaymentQueue 上的 finishTransaction?

发布于 2024-12-11 09:54:52 字数 477 浏览 4 评论 0原文

我对何时确切调用:

[[SKPaymentQueue defaultQueue] finishTransaction:transaction]; 在“服务器产品模型”中有点困惑:http://developer.apple.com/library/mac/documentation/NetworkingInternet/Conceptual/StoreKitGuide/Art/store_transactions.jpg

当我的服务器返回收据有效时是否应该调用它我可以显示付费内容,还是应该在从 itunes 收到收据(购买或恢复)后立即调用它?

谢谢

I'm a little confused on when exactly to call:

[[SKPaymentQueue defaultQueue] finishTransaction:transaction]; in a 'Server Product Model': http://developer.apple.com/library/mac/documentation/NetworkingInternet/Conceptual/StoreKitGuide/Art/store_transactions.jpg

Should it be called when my server returns me that receipt is valid and I can display paid content or should I call it immediately after I get back receipt (purchased or restore) from itunes ?

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

撩人痒 2024-12-18 09:54:53

您应该在服务器检查收据后调用它。如果您太早调用 finishTransaction 并且您的应用程序崩溃或在服务器记录购买之前互联网连接断开,那么客户的钱就会消失,但您不会交付货物。如果收据无效,则收据不是来自 Apple。调用 finishTransaction 可能不会有什么坏处。

You should call it when the server has examined the receipt. If you call finishTransaction too early and your app crashes or the internet connection goes down before your server records the purchases, then the customer's money is gone, but you are not delivering the goods. If the receipt isn't valid, then the receipt doesn't come from Apple. It probably doesn't hurt to call finishTransaction.

忆梦 2024-12-18 09:54:53

当您的服务器返回收据有效并且显示付费内容时,应该调用它。

It should be called when your server returns that receipt is valid and paid content is displayed.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文