Google says you will receive empty orderId if purchase is test purchase. But we are getting proper orderId, so the question is how to check if the purchase made is a Test Purchase or Not. And why are getting orderId ?
-
http://stackoverflow.com/a/31607959/1061944 – Murtaza Khursheed Hussain Jan 26 '16 at 12:44
2 Answers
I guess you're checking the json response and not the Google Play order receipt on email which includes an order number.
The JSON response is not supposed to include orderId if it was a test purchase. Have confirmed this few times. Make sure the account you're using to test purchase is included in the licence test accounts in the Google Play Developer Console > App Settings > Account details, then in the License Testing section.
Check here
When your In-app Billing implementation is ready, you can test purchasing of your in-app SKUs in two ways:
Test purchases, which let your selected license-test users purchase your in-app products without any resulting charges to the user. Test purchases can be used in alpha/beta releases only.
Real purchases, which let regular users make real purchases of your in-app products with actual charges to the user’s payment instruments.
-
I 100% sure about using Test Account (i am never charged for purchases). And i always receive a proper orderId in json response. and same orderId is also sent via email in receipt.Can you share a sample response ? – tashfeen Feb 14 '16 at 12:36
-
@random - we also noticed the same issue as tashfeen - orderId was never empty - are you sure that your answer above is correct? and so is google doc? – Michael Mar 01 '16 at 01:09
-
I haven't checked it recently.It used to happen until few months ago. At that time orderId was not returned in the json response for test account. This was in accordance with their documentation. This impacted our workflow for the test account and so I remember I even asked the support team if a dummy order id could be included in the response for a test account. Haven't followed it up after that. – random Mar 01 '16 at 16:32
The problem gets solved on it own, I really didn't do any special but after sometime I start receiving empty orderId.

- 187
- 1
- 9