民謠, 試圖驗證服務器上的收據,蘋果文檔充其量也是模糊的。蘋果收據驗證危機
The values of the latest_receipt and latest_receipt_info keys are useful when checking whether an auto-renewable subscription is currently active. By providing any transaction receipt for the subscription and checking these values, you can get information about the currently-active subscription period. If the receipt being validated is for the latest renewal, the value for latest_receipt is the same as receipt-data (in the request) and the value for latest_receipt_info is the same as receipt.
我檢查,如果收到的字符串,手機發送匹配的data.latest_receipt
,我回來的蘋果,而不是!
查看我從Apple獲得的JSON對象時,latest_receipt_info
和receipt
中的對象也不相同。
有人可以告訴我他們的經驗,以及如何驗證收據是有效的?
這是一個鏈接,要求使用JSON響應:https://gist.github.com/vasiliyb/23b5ac1fb36c6fd50006 – Cmag 2014-10-01 21:59:13