gpt4 book ai didi

IOS7验证iap收据,in_app filed是什么意思?

转载 作者:塔克拉玛干 更新时间:2023-11-02 08:37:49 25 4
gpt4 key购买 nike

应用程序做一个iap,并将收据发送到我的服务器,我的服务器将它发送到苹果的服务器以验证收据。

IOS7改变了返回数据。

现在,返回数据如下:

{u'environment': u'Sandbox',                                                 
u'receipt': {u'adam_id': 0,
u'app_item_id': 0,
u'application_version': u'1.0',
u'bundle_id': u'com.mztimes.sanguo.international',
u'download_id': 0,
u'in_app': [{u'is_trial_period': u'false',
u'original_purchase_date': u'2014-10-24 06:54:20 Etc/GMT',
u'original_purchase_date_ms': u'1414133660000',
u'original_purchase_date_pst': u'2014-10-23 23:54:20 America/Los_Angeles',
u'original_transaction_id': u'1000000128944402',
u'product_id': u'com.mztimes.sanguo.international.60gold',
u'purchase_date': u'2014-10-28 01:56:45 Etc/GMT',
u'purchase_date_ms': u'1414461405000',
u'purchase_date_pst': u'2014-10-27 18:56:45 America/Los_Angeles',
u'quantity': u'1',
u'transaction_id': u'1000000128944402'},
{u'is_trial_period': u'false',
u'original_purchase_date': u'2014-10-24 06:52:30 Etc/GMT',
u'original_purchase_date_ms': u'1414133550000',
u'original_purchase_date_pst': u'2014-10-23 23:52:30 America/Los_Angeles',
u'original_transaction_id': u'1000000128944196',
u'product_id': u'com.mztimes.sanguo.international.300gold',
u'purchase_date': u'2014-10-28 01:56:45 Etc/GMT',
u'purchase_date_ms': u'1414461405000',
u'purchase_date_pst': u'2014-10-27 18:56:45 America/Los_Angeles',
u'quantity': u'1',
u'transaction_id': u'1000000128944196'},
{u'is_trial_period': u'false',
u'original_purchase_date': u'2014-10-28 01:56:45 Etc/GMT',
u'original_purchase_date_ms': u'1414461405000',
u'original_purchase_date_pst': u'2014-10-27 18:56:45 America/Los_Angeles',
u'original_transaction_id': u'1000000129320617',
u'product_id': u'com.mztimes.sanguo.international.980gold',
u'purchase_date': u'2014-10-28 01:56:45 Etc/GMT',
u'purchase_date_ms': u'1414461405000',
u'purchase_date_pst': u'2014-10-27 18:56:45 America/Los_Angeles',
u'quantity': u'1',
u'transaction_id': u'1000000129320617'}],
u'original_application_version': u'1.0',
u'original_purchase_date': u'2013-08-01 07:00:00 Etc/GMT',
u'original_purchase_date_ms': u'1375340400000',
u'original_purchase_date_pst': u'2013-08-01 00:00:00 America/Los_Angeles',
u'receipt_type': u'ProductionSandbox',
u'request_date': u'2014-10-28 02:50:09 Etc/GMT',
u'request_date_ms': u'1414464609873',
u'request_date_pst': u'2014-10-27 19:50:09 America/Los_Angeles',
u'version_external_identifier': 0},
u'status': 0}

查看 in_app 字段:文档说:

In the JSON file, the value of this key is an array containing all in-app purchase receipts. In the ASN.1 file, there are multiple fields that all have type 17, each of which contains a single in-app purchase receipt.

在我的许多测试中,in_app 列表的最后一个元素是我发送到苹果服务器的收据信息。但是其他两个元素是什么?

我发送不同的收据来验证,其他两个元素始终相同。

这是为什么?帮帮我!

最佳答案

作为doc说,包含基于输入 base-64 收据数据中存在的应用内购买交易的所有应用内购买收据。另请参阅 iOS IAP in_app field in receiptRemoving in app purchases from a new version of the application(iOS)

In-App Purchase Receipt

The receipt for an in-app purchase.

ASN.1 Field Type 17

ASN.1 Field Value SET of in-app purchase receipt attributes

JSON Field Name in_app

JSON Field Value array of in-app purchase receipts

In the JSON file, the value of this key is an array containing all in-app purchase receipts based on the in-app purchase transactions present in the input base-64 receipt-data. For receipts containing auto-renewable subscriptions, check the value of the latest_receipt_info key to get the status of the most recent renewal.

In the ASN.1 file, there are multiple fields that all have type 17, each of which contains a single in-app purchase receipt.

Note: An empty array is a valid receipt.

The in-app purchase receipt for a consumable product is added to the receipt when the purchase is made. It is kept in the receipt until your app finishes that transaction. After that point, it is removed from the receipt the next time the receipt is updated - for example, when the user makes another purchase or if your app explicitly refreshes the receipt.

The in-app purchase receipt for a non-consumable product, auto-renewable subscription, non-renewing subscription, or free subscription remains in the receipt indefinitely.

关于IOS7验证iap收据,in_app filed是什么意思?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26600300/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com