Search Unity

How to detect test iapp or live iapp

Discussion in 'Unity IAP' started by jotus, Feb 17, 2019.

  1. jotus

    jotus

    Joined:
    Oct 3, 2017
    Posts:
    2
    Hi,
    I need to cut off test purchases for analytics.
    How do I determine in the code that this is a test purchase?
    Thank's
     
  2. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
  3. jotus

    jotus

    Joined:
    Oct 3, 2017
    Posts:
    2

    Thank you for your answer, but we do not use unit analytics. I need to find out in the script that this is a test purchase and not send an event. Something is needed:

    Code (CSharp):
    1.  
    2. if(!IsTestPurchase)
    3. {
    4.    OurAnalyticTool.SendEvent(...);
    5. }
    6.  
     
  4. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Please define "test purchase" in your scenario? You mean in an IAP purchase in Google Alpha/Beta release, or similarly in TestFlight?