6 Replies
      Latest reply on May 22, 2020 8:21 AM by Alex8Dev
      ericnx Level 1 Level 1 (0 points)

        We face an issue that are existing the same transaction id from different receipt, but the iap product is a consumable product (not non-consumable or subscription one).

         

        Suppose that transaction id should be unique, they should be not shared between different receipt (in case for consumable product), am i right?

         

        As i know this is an anormal situation, i think there is < 1% from our cs record.

        After the discussion between our cs and customer, his situation should like this:

        • he have 3 devices whose are shared the same Apple Id for IAP
        • all devices are installed the same game
        • he try to purchase through IAP on his all device within 10 minutes
          • he purchase the product A successful on device A and receive the items (server got transaction id A from receipt)
          • he purchase the product A successful on device B but it can't receive the items (server got transaction id A from receipt and try to reject it since it is a duplicated transaction)
          • he purchase the product A successful on device C but it can't receive the items (server got transaction id A & C from recept and try to reject it since it is more than one transaction...)

         

        So my questions are shown as below

        • why the receipt exist the previous transaction id (A) but miss the new transaction id?
        • why the receipt have more than one transaction?

         

        Hope that anyone can assist me to solve this issue ><

        • Re: receiving the same transaction id from different receipt
          PBK Level 7 Level 7 (3,795 points)

          If you call finishTransaction then the IAP field in the transaction should disappear for a consumable.

          It is possible that your code did not call finishTransaction between these purchases.

          This is why I call finishTransaction from within updatedTransactions.

           

          Did your server receive 1) a single transaction receipt with two IAPs or did it receive 2) two different transaction receipts?   If (1), then consider whether the problem could be that you didn't call finishTransaction.  If you are sure you call finishTransaction then this is a bug.  But if your server received two different receipts (2) then consider whether this user is attempting to hack the IAP system by sending duplicate receipts to your server using a Man-In-The-Middle attack.

            • Re: receiving the same transaction id from different receipt
              ericnx Level 1 Level 1 (0 points)

              thx PBK,

               

              about 1), the same transaction id were appeared on two different receipt, but i need double check that finishTransaction was called correctly.

               

              on the case of 2), i think there is not existing Man-in-The-Middle attack, since the receipts were encrypted and the payloads were received from apple's endpoint and their transaction time were not same (but transaction ids are same)

                • Re: receiving the same transaction id from different receipt
                  PBK Level 7 Level 7 (3,795 points)

                  >the payloads were received from apple's endpoint and their transaction time were not same (but transaction ids are same)

                   

                  So if Apple returned two different receipts (i.e. their transaction time(s) were not the same) and they have the same transactionID for a consumable and you called 'finishTransaction' then this is a bug.  I recall that the receipts (in the sandbox) were retaining all consumables a few years ago but I thought that was resolved.

              • Re: receiving the same transaction id from different receipt
                KMT Level 9 Level 9 (15,785 points)

                Sounds similar recent to issues being reported that indicate bugs on the backend, out of the dev's control. Might want to ping support and ask them about it via the 'contact us' link below.

                 

                If the user is setting you up to ask you for a refund, be sure to send them to Apple.

                • Re: receiving the same transaction id from different receipt
                  Alex8Dev Level 1 Level 1 (0 points)

                  We have the same issue, two receipts and all fields are the same, except receipt_creation_date


                  ericnx , did you change verification process after such situation ?