ios - iTunes 收据验证 - in_app 为空
<p><p>在 iTunes 收据的服务器端验证期间,我们遇到了一些收据,我们在“in_app”购买时得到了空的收据。一个空的 in_app 数组表示 StoreKit 尚未记录该用户的任何交易。为什么会发生这种情况,我们是否有任何解决方案来处理这种 in_app 空收据。</p>
<pre><code>{
"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": []
}
}
</code></pre></p>
<br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
<p><p>空的 in_app 数组表示 StoreKit 尚未记录该用户的任何交易。可能是申请回执尚未更新。发生这种情况时,您的应用程序可以通知用户收据不是最新的,并询问是否刷新它。经用户同意后,您的应用应使用 SKReceiptRefreshRequest 类来更新收据。此时,如果 StoreKit 已经为用户记录了一次购买,你的 app 收据会显示在 in_app 中。见 <a href="https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/StoreKitGuide/Chapters/Restoring.html#//apple_ref/doc/uid/TP40008267-CH8-SW2" rel="noreferrer noopener nofollow">Refreshing the App Receipt</a>有关如何更新收据的更多信息。</p>
<p>欲了解更多信息,请查看:<a href="https://developer.apple.com/library/ios/technotes/tn2413/_index.html#//apple_ref/doc/uid/DTS40016228-CH1-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_" rel="noreferrer noopener nofollow">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.</a> </p></p>
<p style="font-size: 20px;">关于ios - iTunes 收据验证 - in_app 为空,我们在Stack Overflow上找到一个类似的问题:
<a href="https://stackoverflow.com/questions/36010595/" rel="noreferrer noopener nofollow" style="color: red;">
https://stackoverflow.com/questions/36010595/
</a>
</p>
页:
[1]