Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我已经成功验证了沙盒收据。现在我考虑失败的情况。在这种情况下,用户在购买后关闭手机,然后收据发送到服务器并且几天没有在手机上。我该如何处理?我有不知道。谁能帮帮我?谢谢 Amuthapriya K
在您成功验证并在您的服务器上记录购买之前,不要完成与 Apple 的交易。即使应用程序重新启动,该交易仍将保留在支付队列中,直到您完成为止。
在事务上调用 finishTransaction: 会将其从队列中移除。您的应用程序应该调用 finishTransaction: 只有在它成功处理了事务并解锁了用户购买的功能之后。
文档:https ://developer.apple.com/documentation/storekit/skpaymentqueue/1506003-finishtransaction?language=objc