一、记录一下
没有订阅(自动续期)型产品的支付凭证,解析时可以不用password参数,结果如下:
{
"receipt": {
"receipt_type": "ProductionSandbox",
"adam_id": 0,
"app_item_id": 0,
"bundle_id": "com.xiangha.pro",
"application_version": "0",
"download_id": 0,
"version_external_identifier": 0,
"receipt_creation_date": "2023-05-09 09:39:15 Etc/GMT",
"receipt_creation_date_ms": "1683625155000",
"receipt_creation_date_pst": "2023-05-09 02:39:15 America/Los_Angeles",
"request_date": "2023-05-09 09:49:33 Etc/GMT",
"request_date_ms": "1683625773910",
"request_date_pst": "2023-05-09 02:49:33 America/Los_Angeles",
"original_purchase_date": "2013-08-01 07:00:00 Etc/GMT",
"original_purchase_date_ms": "1375340400000",
"original_purchase_date_pst": "2013-08-01 00:00:00 America/Los_Angeles",
"original_application_version": "1.0",
"in_app": [
{
"quantity": "1",
"product_id": "com.xiangha.pro.gpt.1001",
"transaction_id": "2000000327362467",
"original_transaction_id": "2000000327362467",
"purchase_date": "2023-05-09 09:39:15 Etc/GMT",
"purchase_date_ms": "1683625155000",
"purchase_date_pst": "2023-05-09 02:39:15 America/Los_Angeles",
"original_purchase_date": "2023-05-09 09:39:15 Etc/GMT",
"original_purchase_date_ms": "1683625155000",
"original_purchase_date_pst": "2023-05-09 02:39:15 America/Los_Angeles",
"is_trial_period": "false",
"in_app_ownership_type": "PURCHASED"
}
]
},
"environment": "Sandbox",
"status": 0
}
没有订阅(自动续期)型产品的支付凭证,解析时带上password参数,结果如下:
{
"receipt": {
"receipt_type": "ProductionSandbox",
"adam_id": 0,
"app_item_id": 0,
"bundle_id": "com.xiangha.pro",
"application_version": "0",
"download_id": 0,
"version_external_identifier": 0,
"receipt_creation_date": "2023-05-09 09:39:15 Etc/GMT",
"receipt_creation_date_ms": "1683625155000",
"receipt_creation_date_pst": "2023-05-09 02:39:15 America/Los_Angeles",
"request_date": "2023-05-09 09:40:30 Etc/GMT",
"request_date_ms": "1683625230312",
"request_date_pst": "2023-05-09 02:40:30 America/Los_Angeles",
"original_purchase_date": "2013-08-01 07:00:00 Etc/GMT",
"original_purchase_date_ms": "1375340400000",
"original_purchase_date_pst": "2013-08-01 00:00:00 America/Los_Angeles",
"original_application_version": "1.0",
"in_app": [
{
"quantity": "1",
"product_id": "com.pro.gpt.1001 ...",
"transaction_id": "2000000327362467",
"original_transaction_id": "2000000327362467",
"purchase_date": "2023-05-09 09:39:15 Etc/GMT",
"purchase_date_ms": "1683625155000",
"purchase_date_pst": "2023-05-09 02:39:15 America/Los_Angeles",
"original_purchase_date": "2023-05-09 09:39:15 Etc/GMT",
"original_purchase_date_ms": "1683625155000",
"original_purchase_date_pst": "2023-05-09 02:39:15 America/Los_Angeles",
"is_trial_period": "false",
"in_app_ownership_type": "PURCHASED"
}
]
},
"environment": "Sandbox",
"latest_receipt_info": [
{
"quantity": "1",
"product_id": "com.xiangha.pro.gpt.1001",
"transaction_id": "2000000327362467",
"original_transaction_id": "2000000327362467",
"purchase_date": "2023-05-09 09:39:15 Etc/GMT",
"purchase_date_ms": "1683625155000",
"purchase_date_pst": "2023-05-09 02:39:15 America/Los_Angeles",
"original_purchase_date": "2023-05-09 09:39:15 Etc/GMT",
"original_purchase_date_ms": "1683625155000",
"original_purchase_date_pst": "2023-05-09 02:39:15 America/Los_Angeles",
"is_trial_period": "false",
"in_app_ownership_type": "PURCHASED"
}
],
"latest_receipt": "MIIUMQYJKc . . . QexkQ==",
"status": 0
}
二、带不带password参数进行解析的结果差异:
多出了两个关键字段:latest_receipt和latest_receipt_info
三、PS
支付凭证包含订阅型产品的,解析时一定要带上 password 参数
标签:订阅,purchase,09,original,2023,苹果,支付,date,05 From: https://www.cnblogs.com/program01/p/17385858.html