苹果内购后台如何验证订单
查阅官方文档
https://developer.apple.com/library/content/releasenotes/General/ValidateAppStoreReceipt/Chapters/ValidateRemotely.html
其实挺简单的:
接口信息
正式验证api地址
https://buy.itunes.apple.com/verifyReceipt
沙箱验证api地址
https://sandbox.itunes.apple.com/verifyReceipt
参数就一个:
receipt-data
请求方式:
POST
不过要注意的是,不能用正常的post去请求,否者会报错
21002
错误
我们需要自己构造请求体:
{
'receipt-data':'Bdkd7D97DBVLhjldj6LLFD.....'
}
这里附上一张用postman调通的截图吧: