Recently implemented in-app billing for my app and everything seems to be working fine.
Followed the instructions in Testing in-app Billing, used the android.test.purchased
id to simulate the purchase.
Reason I say seems to work is because the purchase flow works fine, pops up the dialog, shows 'payment successful' and able to query the inventory after purchase etc
However, I do not see any orders listed in my Google Wallet Merchant Centre. I noticed this, because I wanted to cancel an order to re-test the purchase.
The tutorial implies that test purchases will be listed and you can cancel manually:
Cancelling completed test purchases
Cancel purchases manually—you can go to the Google Wallet Merchant Center, look up the transaction, and then cancel it. You can find transactions by looking up their order numbers.
Also, I've noticed that when setting up the IabHelper
it doesn't matter if I put in my Base64-encoded public key, or a random string, the IabHelper
always successfully starts up. For example, the following works:
mIabHelper = new IabHelper(this, "this-can-be-any-string");
Despite the transaction flow seemingly working properly, given the two points:
IabHelper
is indifferent to a random string vs my public keyI am wondering if I've done something wrong.
Does anyone have any suggestions/know what is going on?
Purchases will not be listed on your developer console, when you use the IDs
android.test.purchased
android.test.refunded
android.test.cancelled.
These are product IDs for static responses, used to only simulate the testing, during early stages of development. For testing your app with real-time test purchases, you might want to do things that are suggested in the section Setting Up for Test Purchases
of your link and here
Test your public key relevance when you tryout the real test purchase. It is more likely that the IABHelper is indifferent only incase of static testing. Ideally, you should get a 'Signature Mismatch Error' when the public Keys don't match.