Posts

Post not yet marked as solved
1 Replies
966 Views
Hello,In my production environment, I met this case serval times when my server tries to verify the subscription status with app server via https://buy.itunes.apple.com/verifyReceiptFor example:My server got a notification from apple server{ "latest_receipt":"xxxxxxxx=", "latest_receipt_info":{ "original_purchase_date_pst":"2020-02-21 12:36:30 America/Los_Angeles", "quantity":"1", "subscription_group_identifier":"202***5", "unique_vendor_identifier":"E1xxxxxxxxxxEC", "original_purchase_date_ms":"1582317390000", "expires_date_formatted":"2020-03-21 19:36:28 Etc/GMT", "is_in_intro_offer_period":"false", "purchase_date_ms":"1582317388000", "expires_date_formatted_pst":"2020-03-21 12:36:28 America/Los_Angeles", "is_trial_period":"false", "item_id":"1031***040", "unique_identifier":"00xxxxxx-00xxxxxxxx02E", "original_transaction_id":"47xxxxxxx8715", "expires_date":"1584819388000", "app_item_id":"95***346", "transaction_id":"47xxxxxxxxx8715", "bvrs":"2254", "web_order_line_item_id":"4700xxxx175298", "version_external_identifier":"834***361", "bid":"com.xxxxxxxxxxxxxxxxxos", "product_id":"ixxxxxxxxxxxxxxx9", "purchase_date":"2020-02-21 20:36:28 Etc/GMT", "purchase_date_pst":"2020-02-21 12:36:28 America/Los_Angeles", "original_purchase_date":"2020-02-21 20:36:30 Etc/GMT" }, "environment":"PROD", "auto_renew_status":"true", "unified_receipt":{ "latest_receipt":"MIxxxxxxxxxxxxxxxxxxxxxxzHg==", "pending_renewal_info":[ { "original_transaction_id":"47xxxxxxxxxx8715", "product_id":"ixxxxxxxxxxxxxx9", "auto_renew_status":"1", "auto_renew_product_id":"ixxxxxxxxxxxxxxx9" } ], "environment":"Production", "status":0, "latest_receipt_info":[ { "expires_date_pst":"2020-03-21 12:36:28 America/Los_Angeles", "purchase_date":"2020-02-21 20:36:28 Etc/GMT", "purchase_date_ms":"1582317388000", "original_purchase_date_ms":"1582317390000", "transaction_id":"47xxxxxxx8715", "original_transaction_id":"47xxxxxxx8715", "quantity":"1", "expires_date_ms":"1584819388000", "original_purchase_date_pst":"2020-02-21 12:36:30 America/Los_Angeles", "product_id":"ixxxxxxxxxx9", "subscription_group_identifier":"2xx36295", "web_order_line_item_id":"4700***1175298", "expires_date":"2020-03-21 19:36:28 Etc/GMT", "is_in_intro_offer_period":"false", "original_purchase_date":"2020-02-21 20:36:30 Etc/GMT", "purchase_date_pst":"2020-02-21 12:36:28 America/Los_Angeles", "is_trial_period":"false" } ] }, "password":"xxxxx", "auto_renew_product_id":"ipxxxxxxxx9", "notification_type":"INITIAL_BUY" }but when I tried to verify the subscription via the API https://buy.itunes.apple.com/verifyReceipt 3 days laterI got a response like below:{ "receipt":{ "receipt_type":"Production", "adam_id":951***346, "app_item_id":951***346, "bundle_id":"com.mmguardian.childapp.ios", "application_version":"2254", "download_id":8705***09772361, "version_external_identifier":83***1361, "receipt_creation_date":"2020-02-21 20:33:30 Etc/GMT", "receipt_creation_date_ms":"1582317210000", "receipt_creation_date_pst":"2020-02-21 12:33:30 America/Los_Angeles", "request_date":"2020-02-24 23:25:22 Etc/GMT", "request_date_ms":"1582586722270", "request_date_pst":"2020-02-24 15:25:22 America/Los_Angeles", "original_purchase_date":"2020-02-06 23:42:51 Etc/GMT", "original_purchase_date_ms":"1581032571000", "original_purchase_date_pst":"2020-02-06 15:42:51 America/Los_Angeles", "original_application_version":"2240", "in_app":[ ] }, "status":0, "environment":"Production" }I am confusing about 2 things:1. There is no "latest_receipt_info" or "latest_receipt" in the response, what's this case mean? Did the customer really pay for his subscription or for some reason, the customer could not make the subscription successfully.2.About the "original_purchase_date", we can see that from the notification, "original_purchase_date" is "2020-02-21 20:36:30 Etc/GMT",but in the response of the verifyReceipt API, "original_purchase_date" turned to "2020-02-06 23:42:51 Etc/GMT", while "receipt_creation_date" is "2020-02-21 20:33:30 Etc/GMT", which is not make sense.This problem has bothered me for a long time, thanks in advance.
Posted
by Harry Du.
Last updated
.