我有一个只有(仅)自动续订订阅的应用程序:
我有一个后端我验证收据。我使用apple返回的验证结果JSON结构中的Output0
值来启用用户的订阅。有时这个JSON密钥存在,但有时它会丢失。以下是缺少此密钥的示例响应:
latest_receipt_info
我该如何处理这个案子?我需要{
"status":0,
"environment":"Sandbox",
"receipt":{
"download_id":0,
"adam_id":0,
"request_date":"2018-03-22 10:28:02 Etc/GMT",
"app_item_id":0,
"original_purchase_date_pst":"2013-08-01 00:00:00 America/Los_Angeles",
"version_external_identifier":0,
"receipt_creation_date":"2018-03-12 12:29:54 Etc/GMT",
"in_app":[
],
"original_purchase_date_ms":"1375340400000",
"original_application_version":"1.0",
"original_purchase_date":"2013-08-01 07:00:00 Etc/GMT",
"request_date_ms":"1521714482146",
"bundle_id":"my.App",
"receipt_creation_date_pst":"2018-03-12 05:29:54 America/Los_Angeles",
"application_version":"201824020001",
"request_date_pst":"2018-03-22 03:28:02 America/Los_Angeles",
"receipt_creation_date_ms":"1520857794000",
"receipt_type":"ProductionSandbox"
}
}
,transaction_id
字段才能处理经过验证的收据。