2016-03-15 114 views
2

在iTunes中收到的服務器端驗證,我們遇到了一些收據,我們越來越空「in_app」購買。一個空的in_app數組表明StoreKit尚未記錄該用戶的任何事務。爲什麼會這樣?我們有處理這類in_app空收據的任何解決方案。iTunes的收據驗證 - in_app空

{ 
    "status": 0, 
    "environment": "Production", 
    "receipt": { 
    "receipt_type": "Production", 
    "adam_id": *******, 
    "app_item_id": *******, 
    "bundle_id": "com.***************", 
    "application_version": "0", 
    "download_id": 85015170192768, 
    "version_external_identifier": 816491596, 
    "receipt_creation_date": "2016-03-10 16:29:03 Etc/GMT", 
    "receipt_creation_date_ms": "1457627343000", 
    "receipt_creation_date_pst": "2016-03-10 08:29:03 America/Los_Angeles", 
    "request_date": "2016-03-11 05:24:19 Etc/GMT", 
    "request_date_ms": "1457673859599", 
    "request_date_pst": "2016-03-10 21:24:19 America/Los_Angeles", 
    "original_purchase_date": "2015-12-27 15:37:38 Etc/GMT", 
    "original_purchase_date_ms": "1451230658000", 
    "original_purchase_date_pst": "2015-12-27 07:37:38 America/Los_Angeles", 
    "original_application_version": "1", 
    "in_app": [] 
    } 
} 

回答

2

一個空的in_app數組表示StoreKit尚未記錄該用戶的任何事務。可能是應用收據尚未更新。發生這種情況時,你的應用程序可以通知回執不會出現電流,詢問是否刷新用戶。一旦用戶協議,您的應用程序應該使用SKReceiptRefreshRequest類更新收據。在這一點上,如果StoreKit記錄了該用戶的購買,您的應用程序收據將顯示它在in_app。關於如何更新收據更多信息,請Refreshing the App Receipt

欲瞭解更多信息,請查閱:My app validates its receipt with the App Store via paymentQueue:updatedTransactions: after a successful purchase. However, the returned receipt contains an empty in_app array rather than the expected products.