iOS 内购订阅型项目

0x00 验证结果21004

苹果服务器向返回status结果,含义如下,其中为0时表示成功。
21000 App Store无法读取你提供的JSON数据
21002 收据数据不符合格式
21003 收据无法被验证
21004 你提供的共享密钥和账户的共享密钥不一致
21005 收据服务器当前不可用
21006 收据是有效的,但订阅服务已经过期。当收到这个信息时,解码后的收据信息也包含在返回内容中
21007 收据信息是测试用(sandbox),但却被发送到产品环境中验证
21008 收据信息是产品环境中使用,但却被发送到测试环境中验证


0x01 主共享密钥

主共享密钥是用于接收您所有自动续订订阅收据的唯一代码。要测试或提供自动续订订阅,您必须使用主共享密钥或为每个 App 使用一个 App 专用共享密钥。

requestBody
The JSON contents you submit with the request to the App Store.

Properties
receipt-data(byte):
(Required) The Base64 encoded receipt data.

password(string):
(Required) Your app's shared secret (a hexadecimal string).Use this field only for receipts that contain auto-renewable subscriptions.

exclude-old-transactions(boolean):
Set this value to true for the response to include only the latest renewal transaction for any subscriptions.
Use this field only for app receipts that contain auto-renewable subscriptions.

官方文档

https://developer.apple.com/documentation/appstorereceipts?language=objc


猜你喜欢

转载自blog.csdn.net/xjh093/article/details/105278240