Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[Closed] [iOS] RestoreTransactions does not include unique transaction_id

Discussion in 'Unity IAP' started by Baroni, Jul 19, 2017.

Thread Status:
Not open for further replies.
  1. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,256
    Case #932848

    Testing environment:

    - Unity 5.6.2f1
    - Unity IAP 1.11.4
    - iTunes sandbox test user that successfully bought a non-consumable product

    Issue:

    After calling Unity IAP's IAppleExtensions RestoreTransactions, sending the non-consumable product's receipt to PlayFab for validation fails with "error": "ReceiptAlreadyUsed".

    Cause:
    PlayFab thinks that the receipt has been used already. This is because Unity IAP returns the same transaction_id in its receipt, in each call to RestoreTransactions. Although Unity IAP finishes the restore transaction with a different transaction_id as logged in Xcode, the transaction_id property in the receipt is still equal to the original_transaction_id property.

    From Apple's documentation
    This is not the case.

    Proof 1:

    Base64 encoded receipt:
    Xcode output:
    UnityIAP:Finishing transaction 1000000316852957

    Decoded Apple response:

    Proof 2:

    Base64 encoded receipt:
    Xcode output:
    UnityIAP:Finishing transaction 1000000316861767

    Decoded Apple response:
     
    Last edited: Jul 19, 2017
Thread Status:
Not open for further replies.