iTunes Reciept验证 - in_app为空

时间:2016-03-15 11:53:27

标签: ios in-app-purchase

在iTunes收据的服务器端验证期间,我们遇到了一些收据,我们将收到空的“in_app”购买。空的in_app数组表示StoreKit尚未记录该用户的任何事务。为什么会发生这种情况,我们是否有任何解决方案来处理这种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": []
  }
}

1 个答案:

答案 0 :(得分: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.