是否可以刷新来自 iTunes API 的应用内订阅收据?
Is it possible to refresh the receipt of an in-app subscription from an iTunes API?
我有一个后端 api,它在购买 iTunes 订阅时接受来自客户端 ios 设备的收据哈希数据。我使用 https://buy.itunes.apple.com/verifyReceipt
验证来自 Apple 的收据数据并获取订阅详细信息,例如交易 ID、到期日期等。
似乎是基于this post that I need to refresh such receipts to discover whether or not there is a cancellation_date. Other than doing this from an ios device as described in the developer docs,有没有其他方法可以从服务器端调用 itunes 端点?
发送收据本身并让服务器存储它。然后,根据需要经常从服务器重新发送收据以检查订阅更新。
Persisting Using Your Own Server
Send a copy of the receipt to your server along with some kind of credentials or identifier so you can keep track of which receipts belong to a particular user. For example, let users identify themselves to your server with an email or user name, plus a password. Don’t use the identifierForVendor property of UIDevice—you can’t use it to identify and restore purchases made by the same user on a different device, because different devices have different values for this property.
有关如何在服务器端验证收据的 documentation 在这里可能也会有所帮助。
我有一个后端 api,它在购买 iTunes 订阅时接受来自客户端 ios 设备的收据哈希数据。我使用 https://buy.itunes.apple.com/verifyReceipt
验证来自 Apple 的收据数据并获取订阅详细信息,例如交易 ID、到期日期等。
似乎是基于this post that I need to refresh such receipts to discover whether or not there is a cancellation_date. Other than doing this from an ios device as described in the developer docs,有没有其他方法可以从服务器端调用 itunes 端点?
发送收据本身并让服务器存储它。然后,根据需要经常从服务器重新发送收据以检查订阅更新。
Persisting Using Your Own Server
Send a copy of the receipt to your server along with some kind of credentials or identifier so you can keep track of which receipts belong to a particular user. For example, let users identify themselves to your server with an email or user name, plus a password. Don’t use the identifierForVendor property of UIDevice—you can’t use it to identify and restore purchases made by the same user on a different device, because different devices have different values for this property.
有关如何在服务器端验证收据的 documentation 在这里可能也会有所帮助。