Search Unity

Resolved How Can i check IAP transaction from Sandbox Apple and real Transaction(Google Store to)

Discussion in 'Unity IAP' started by LuckyStarr, Apr 15, 2020.

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

    LuckyStarr

    Joined:
    Feb 6, 2018
    Posts:
    17
    Hey everyone. May be someone know how i can determine real and sandbox transaction.
    I check args.purchasedProduct.receipt on Android, but he has real data structure.
    I think ios woud be to.

    How do I determine if a transaction is test on the client side
     
    rbitard likes this.
  2. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    I am not familiar with a way to distinguish. What is your goal? Understood that Sandbox and real transactions will all show as verified revenue on your Dashboard, this is a known behavior.
     
  3. LuckyStarr

    LuckyStarr

    Joined:
    Feb 6, 2018
    Posts:
    17
    In my analytics dashbord Real transaction and transaction from sandbox are identity.
    Test IAP receipts from Apple/Google are polluting data in statistic, creating artificially high revenue numbers.
    Im need code to purchase process to to skip logging any test receipts
     
  4. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Yes, I understand the problem, please refer to my first reply. Sorry about that!
     
    LuckyStarr likes this.
  5. LuckyStarr

    LuckyStarr

    Joined:
    Feb 6, 2018
    Posts:
    17
    So, they identity? And i cant do anything)))))????))))
     
  6. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    That is correct. Once your game starts making IAP revenue, the test purchases should only be a small percentage.
     
    LuckyStarr likes this.
  7. rbitard

    rbitard

    Joined:
    Jan 11, 2022
    Posts:
    197
    Hey, is this still the same ? Or can I filter them ?
    Thanks in advance
     
  8. Yannick_D

    Yannick_D

    Unity Technologies

    Joined:
    Feb 21, 2022
    Posts:
    235
  9. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,264
    There actually is one way - using server side validation, the server will know whether it validated with the Sandbox or Production endpoint. When parsing an original receipt you received from an App Store, there are indeed no fields that tell you the environment it came from.
     
    Arnaud_Gorain, rbitard and Yannick_D like this.
  10. Arnaud_Gorain

    Arnaud_Gorain

    Unity Technologies

    Joined:
    Jun 28, 2022
    Posts:
    182
    This thread is now closed. Feel free to reach out via a new thread if you encounter further issues.
    Thanks!
     
Thread Status:
Not open for further replies.