2014-10-01 36 views
1

民謠, 試圖驗證服務器上的收據,蘋果文檔充其量也是模糊的。蘋果收據驗證危機

從文檔最後一段(https://developer.apple.com/library/ios/releasenotes/General/ValidateAppStoreReceipt/Chapters/ValidateRemotely.html):

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_inforeceipt中的對象也不相同。

有人可以告訴我他們的經驗,以及如何驗證收據是有效的?

+1

這是一個鏈接,要求使用JSON響應:https://gist.github.com/vasiliyb/23b5ac1fb36c6fd50006 – Cmag 2014-10-01 21:59:13

回答

0

這最後一段很可能是關於最新的收據樣式。當你使用舊的。