如何 synchronize/verify 使用网络服务器进行应用内循环订阅(跨平台订阅)

How to synchronize/verify in-app recurring subscriptions with a web server (cross platform subscription)

我们 运行 一个 SAAS Web 应用程序,并将在 Apple 的应用程序商店中发布我们的应用程序(到目前为止,我们已经有了一个移动 Web 应用程序)。

由于我们的客户易于使用,我们希望提供在应用程序中购买订阅的功能。没问题,我们知道怎么做。

我们的问题是是否有一种简单的方法可以让我们的网络应用程序的数据库根据用户当前的订阅状态进行更新,这样如果他们访问我们的网络应用程序我们就知道他们的订阅是否有效。

理想情况下,如果 Apple 提供 Web 挂钩选项,他们可以 post 更新我们服务器上的 url,那就太好了。据我所知,这不是一个选择。

当用户登录时,我们总是可以从 iPhone 应用程序 post 向我们的服务器发送数据,但是如果用户一段时间没有登录 iPhone而我们服务器上记录的订阅状态将过期。

其他人如何处理这个问题?我们是不是漏掉了什么?

更新:

我找到的最接近的是这个线程:https://forums.developer.apple.com/message/70707#70707

The app gets a receipt the first time it buys a subscription or restores a subscription. The app can send that original receipt to anyone's server. Anyone's server can then use that orignal receipt to verify the current subscrition anytime it wants. You can't do that with a non-renewing subscription but with a non-renewing subscription the user must purchase the extension from the iOS device each time period.

跟进了这个: https://hetzel.net/2011-04-01/server-side-auto-renewable-subscription-receipt-verification/

从 Apple 看来,他们绝对没有对同步做出任何规定:

Cross-Platform Considerations

Product identifiers are associated with a single app. Apps that have both an iOS and OS X version have separate products with separate product identifiers on each platform. You could let users who have a subscription in an iOS app access the content from an OS X app (or vice versa), but implementing that functionality is your responsibility. You would need some system for identifying users and keeping track of what content they’ve subscribed to, similar to what you would implement for an app that uses non-renewable subscriptions.

派对迟到了,但我认为这是对这个问题的相关回复:

希望这对某人有帮助:)