调用 SubscriptionsUpdated 自动续订订阅

发布于 2024-12-18 13:15:27 字数 263 浏览 1 评论 0原文

我在我的应用程序中实现了一些自动更新订阅,一切正常。我在应用程序中执行购买,所有内容都会同步到服务器,然后服务器会在订阅过期后立即检查 iTunes API,以检测订阅是否已续订。

但有一件事让我感到困惑。每隔一段时间,我就会在应用程序中收到对 transactionsUpdated 的调用,其中的交易状态为:已购买。这通常是在我重新启动应用程序后完成的。

为什么我会接到这些电话?跟订阅续订有关系吗?我可以安全地忽略这些电话吗?一切似乎都运转良好。

提前致谢!

I have implemented som auto renewable subscriptions in my app and everything works well. I perform a purchase in the app, everything gets synced to a server, and the server then checks the iTunes API as soon as the subscription has expired to detect if the subscription has been renewed.

One thing confuses me though. Every once in a while I get a call to transactionsUpdated within my app with a transaction with status: Purchased. This is usually done after I restart the app.

Why do I get these calls? Has it something to do with the subscription beeing renewed? Can I safely ignore these calls? Everything seems to work fine.

Thanks in advance!

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

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

发布评论

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

评论(1

飘过的浮云 2024-12-25 13:15:27

是的,Apple 正在做的是向您发送自动续订订阅的收据。由于沙盒中的所有持续时间都大大缩短,因此 Apple 每隔几分钟就会自动续订一次订阅,续订次数有限(例如 5 次),然后才会停止续订。

由于您已经在服务器上适时检查新收据,因此您可以忽略它们有时自动发送到应用程序的收据。

Yes, what Apple is doing is sending you a receipt for an automatic renewal of the subscription. Because all durations are drastically shortened in the sandbox, the subscription will get automatically renewed by Apple every few minutes, for a limited number of times (like 5), before they stop renewing.

Since you're already checking for new receipts at the right time on your server, you can ignore the receipts they're automatically sending to the app on occasion.

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