7 Replies
      Latest reply on Aug 8, 2019 6:35 PM by PBK
      foxpower Level 1 Level 1 (0 points)

        A user create two order and pay success,  app get two receipt and send to web server to verify. Two receipts are totally diffrrent, but the verification results are similar between the two receipts, as shown below:

         

        {
            environment = Production;
            receipt =     {
                "adam_id" = 1395152179;
                "app_item_id" = 1395152179;
                "application_version" = 11458;
                "bundle_id" = "com.qeeyou.MobileGameAccelerator";
                "download_id" = 78035935054534;
                "in_app" =         (
                                {
                        "is_trial_period" = false;
                        "original_purchase_date" = "2019-07-05 07:58:46 Etc/GMT";
                        "original_purchase_date_ms" = 1562313526000;
                        "original_purchase_date_pst" = "2019-07-05 00:58:46 America/Los_Angeles";
                        "original_transaction_id" = 380000435059330;
                        "product_id" = 1;
                        "purchase_date" = "2019-07-05 07:58:46 Etc/GMT";
                        "purchase_date_ms" = 1562313526000;
                        "purchase_date_pst" = "2019-07-05 00:58:46 America/Los_Angeles";
                        quantity = 1;
                        "transaction_id" = 380000435059330;
                    }
                );
                "original_application_version" = 6422;
                "original_purchase_date" = "2018-12-21 18:27:56 Etc/GMT";
                "original_purchase_date_ms" = 1545416876000;
                "original_purchase_date_pst" = "2018-12-21 10:27:56 America/Los_Angeles";
                "receipt_creation_date" = "2019-07-05 07:58:46 Etc/GMT";
                "receipt_creation_date_ms" = 1562313526000;
                "receipt_creation_date_pst" = "2019-07-05 00:58:46 America/Los_Angeles";
                "receipt_type" = Production;
                "request_date" = "2019-08-06 03:10:18 Etc/GMT";
                "request_date_ms" = 1565061018828;
                "request_date_pst" = "2019-08-05 20:10:18 America/Los_Angeles";
                "version_external_identifier" = 831565334;
            };
            status = 0;
        }
        
        

         

         

        {
            environment = Production;
            receipt =     {
                "adam_id" = 1395152179;
                "app_item_id" = 1395152179;
                "application_version" = 12137;
                "bundle_id" = "com.qeeyou.MobileGameAccelerator";
                "download_id" = 78035935054534;
                "in_app" =         (
                                {
                        "is_trial_period" = false;
                        "original_purchase_date" = "2019-07-05 07:58:46 Etc/GMT";
                        "original_purchase_date_ms" = 1562313526000;
                        "original_purchase_date_pst" = "2019-07-05 00:58:46 America/Los_Angeles";
                        "original_transaction_id" = 380000435059330;
                        "product_id" = 1;
                        "purchase_date" = "2019-07-05 07:58:46 Etc/GMT";
                        "purchase_date_ms" = 1562313526000;
                        "purchase_date_pst" = "2019-07-05 00:58:46 America/Los_Angeles";
                        quantity = 1;
                        "transaction_id" = 380000435059330;
                    }
                );
                "original_application_version" = 6422;
                "original_purchase_date" = "2018-12-21 18:27:56 Etc/GMT";
                "original_purchase_date_ms" = 1545416876000;
                "original_purchase_date_pst" = "2018-12-21 10:27:56 America/Los_Angeles";
                "receipt_creation_date" = "2019-08-04 09:03:34 Etc/GMT";
                "receipt_creation_date_ms" = 1564909414000;
                "receipt_creation_date_pst" = "2019-08-04 02:03:34 America/Los_Angeles";
                "receipt_type" = Production;
                "request_date" = "2019-08-06 03:10:19 Etc/GMT";
                "request_date_ms" = 1565061019283;
                "request_date_pst" = "2019-08-05 20:10:19 America/Los_Angeles";
                "version_external_identifier" = 832123956;
            };
            status = 0;
        }
        
        

         

         

        the content in "in_app" is completely same.  I can't get the latest order info from the second receipt.

        So I want to know how to resolve the problem, Thanks!

        • Re: Server verify receipt has some wrong occured
          PBK Level 7 Level 7 (3,265 points)

          These two receipts were generated at different times (July 5 and August 4) by different versions of your app. Both receipts include the IAP receipt from the same IAP that was purchased by this individual on July 5.  .......what is your question?

            • Re: Server verify receipt has some wrong occured
              PBK Level 7 Level 7 (3,265 points)

              And one thing that is unusual - the producr_id for your IAP is “1”.

              • Re: Server verify receipt has some wrong occured
                foxpower Level 1 Level 1 (0 points)

                Thanks for your reply, there are two receipt comes from the same user. According to the verify result of the second receipt, I can't get the info of the second order, so the user of my app can't recharge sucessfully. So I want to know why the second verify result didn't contain the second order info, and what should we do to deal with the exceptions. Thanks again!

                  • Re: Server verify receipt has some wrong occured
                    PBK Level 7 Level 7 (3,265 points)

                    There is only one purchase. That is why there is only one receipt in theIAP field. The second receipt is for a restoreCompletedTransaction or a repurchase for free transaction of the first purchase. .  You can relate it to the first using the origiinal_transaction_id.

                      • Re: Server verify receipt has some wrong occured
                        foxpower Level 1 Level 1 (0 points)

                        Thanks, but the goods is kind of Non-Renewing subscriptions,  and user can't restore the purchase by my app.  More unusual, when the user create the third order and pay successfully, I get the receipt and verify it, the result of the receipt contain the all three orders.So I believe the user pay success for the second order.

                          • Re: Server verify receipt has some wrong occured
                            PBK Level 7 Level 7 (3,265 points)

                            You can refresh the receipt and, in fact, when an app is installed in a device a certain way the receipt can contain all previous IAPs by that user. Both of the receipts you posted are for the same single purchase. If the user purchased it a second time the receipt will have a different purchase_date and transaction_id. Actually, it will have 2 IAP fields with different purchase_date and transaction_id fields. Check your receipt with 3 purchases - that 2nd purchase purchase_date and transaction_id is not in either of these receipts is it.  The second receipt posted above was sent before the device made that second purchase. Check your code to figure out why that might have happened.