Recently when testing in-app purchasing in our Unity game, the flow from Google Play has changed. We're using the In-App Purchasing lib that comes with Unity itself.
When the purchase is launched, instead of the green "Buy" button, I get a grey one:
And whenever the purchase is completed, instead of a "Payment successful" dialog, I get a "You've added X to your library":
Some other additions:
Okay, this seems to be related to a change in how Google Play handles test transactions (i.e. transactions for alpha/beta users who won't pay)
From a mail from Google Play:
Hello Google Play Developer,
Beginning June 20, 2016, we’ll be making a change to test purchases for one-time in-app purchases (IAPs).
Previously, test purchases for one-time IAPs generated order IDs. Starting June 20, 2016, one-time IAPs will not generate order IDs and will not appear in the Merchant Center. This behavior already applies to subscription IAPs.
You can learn more about testing in-app billing in the Android Developers Help Center (which will be updated with the information above on June 20).
Thanks for supporting Google Play,
The Google Play Team
On the page itself, there's a note:
Note: For test purchases, leave the orderId field blank. You can use the purchaseToken field to identify test purchases.
I've yet to find an example of how to actually use the
purchaseToken to validate that; the purchase token is either encrypted or compressed base64.
The guys at Unity are working on a fix: http://forum.unity3d.com/threads/bizarre-iap-behaviour-on-android.412981/#post-2698038
TL;DR: this affects sandbox purchases only and doesn't affect the live app