Reputation: 443
I have implemented inapp purchase for my android app. I have found following link: https://developers.google.com/commerce/wallet/instant-buy/test-flows
According to this link, i can create a dummy credit card and wallet account using sandbox testing.
But is it applicable to inapp purchases? or only the purchases from google play?
I have created a test wallet account and added dummy card with ni 4111 1111 1111 1111
which is valid card no acccording to the above tutorial.
but while purchasing item from my app, i have entered the card details 1st time, then it says "this card no is not valid"
Any idea how to use this facility?
Upvotes: 1
Views: 4097
Reputation: 1050
In android billing library version 3 ,Testing with dummy credit card is not allowed. To test your application , you have need to use a original credit card. But before this make sure your Google account has been added as test account on developer account.
Login to market.android.com/publish Click settings, "Account details" Add e-mail adresses to the field "License testing"
Make sure to upload the signed APK to developer console. Make sure to install the signed APK on your device not launch the app in the debugger. Make sure to create a test account in your developer console.
Make sure to sign in your device with your test account (with the same e-email id you have added in account details over google play developer console).
Make sure to create in app billing in your developer console and finally activate the item from the console!!! (this is the one that got me after fully following google's tutorial) Make sure to set VersionCode and VersionName in the manifest to be the same as the version in the developer console (Alpha, Beta or Production. Drafts does not work anymore).
and then during product purchase - you will see a message below your email-id that 'This is test order, you will not be charged.'
Upvotes: 2