2

Apple サーバーから返されたトランザクションの領収書から有効期限を取得する必要があります。

そこから必要な情報を取得するのを手伝ってください.latest_receipt_infoと領収書には有効期限やその他の情報もあります.どちらを使用すればよいですか.

また、phpサーバーに挿入する前に購入日を変換する必要がありますか?その場合、どのタイムゾーンに入れる必要がありますか?

私の質問はダンプ質問のように見えるかもしれません.ご容赦ください.

どうもありがとう

「領収書」:{"original_purchase_pst": "2012-07-24 05:41:19 America/Los_angeles"、 "inlect_identifier": "46f070c011e0da17bc168ae9d3901dcf961f8c09" "" 10005333333333333333333334 transaction_id":"1000000053343936", "quantity":"1", "product_id":"com.XX.XXX", "original_purchase_date_ms":"1343133679239", "bid":"com.XX.XXX", "web_order_line_item_id" :"1000000026126403", "bvrs":"1.0", "expires_date_formatted":"2012-07-24 13:11:18 Etc/GMT", "purchase_date":"2012-07-24 12:41:18 Etc/ GMT", "purchase_date_ms":"1343133678998", "expires_date_formatted_pst":"2012-07-24 06:11:18 America/Los_Angeles", "purchase_date_pst":"2012-07-24 05:41:18 America/Los_Angeles", "original_purchase_date":"2012- 07-24 12:41:19 Etc/GMT", "item_id":"547592716"}, "latest_receipt_info":{"original_purchase_date_pst":"2012-07-24 05:41:19 America/Los_Angeles", "unique_identifier" :"46f070c011e0da17bc168ae9d3901dcf961f8c09"、"original_transaction_id":"1000000053343936"、"expires_date":"1343135478000"、"transaction_id":"1000000053343936"、"quantity_id"、"xxx"、"xxx" com.xxx".1: original_purchase_date_ms":"1343133679000"、"bid":"com.XX.XXX"、"web_order_line_item_id":"1000000026126403"、"bvrs":"1.0"、"expires_date_formatted":"2012-07-24 13:11:18 Etc/GMT" , "purchase_date":"2012-07-24 12:41:18 Etc/GMT", "purchase_date_ms":"1343133678000", "expires_date_formatted_pst":"2012-07-24 06:11:18 America/Los_Angeles", " purchase_date_pst":"2012-07-24 05:41:18 America/Los_Angeles", "original_purchase_date":"2012-07-24 12:41:19 Etc/GMT", "item_id":"547592716"}, "ステータス":0, "latest_receipt":"ewoJInNpZ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mxkR1Z6ZEdsdVp5STdDZ2tpY0hWeVkyaGhjMlV0WkdGMFpTMXdjM1FpSUQwZ0lqSXdNVEl0TURjdE1qUWdNRFU2TkRFNk1UZ2dRVzFsY21sallTOU1iM05mUVc1blpXeGxjeUk3Q2draWNYVmhiblJwZEhraUlEMGdJakVpT3dwOSI7CgkiZW52aXJvbm1lbnQiID0gIlNhbmRib3giOwoJInBvZCIgPSAiMTAwIjsKCSJzaWduaW5nLXN0YXR1cyIgPSAiMCI7Cn0"

4

1 に答える 1

1

領収書は単なるJSONコンテンツなので、SBJSONのようなJSONパーサーをお勧めします。これにより、すべての値とキーを含むNSDictionary/NSArrayが作成されます。次に、通常のディクショナリメソッドと配列メソッドを使用してデータにアクセスします。

次に、expires_date_formattedキーを使用して値を取得できます。

注:私はMKStoreKitの大ファンではありません。InApの購入について詳しく知りたい場合は(レシートレベルにいるので、もう少し知っているかもしれません)、この投稿をご覧ください。

お役に立てれば。

于 2012-07-27T06:41:23.340 に答える