1

Is there a way to programmatically check if a purchase is a test purchase or a regular one?

When you attempt a test purchase, Google notifies you that this is a test purchase and that you will not be charged for it. Is there a way to get that information in code?

Simon B.
  • 2,530
  • 24
  • 30
  • The SKU you use for test purchase..shows that it is a test purchase – Meenal Nov 06 '14 at 12:26
  • android.test.purchased this shows it is a test purchase.. – Meenal Nov 06 '14 at 12:29
  • 3
    That is for static purchases only. What if we have a regular purchase only that it's made with an account listed as a tester account. In that case a valid purchase is made, but Google does notify the user in the prompt, that it's a test purchase. – Arctic Conductor Nov 06 '14 at 12:35

1 Answers1

1

I tried it too much, unfortunately there is no way to get this information from Google on an Android application for now. If you are doing regular purchase with a tester account, all responses you got from Google apis are same with a non tester account. So it is impossible to differentiate it.