Test your InApp’s
Sandbox Mode
In order to test your InApp Purchase functions perform following steps.
- Code your functions in Construct (with CocoonInApp or CordovaIAP plugin)
- Build and upload your game as Alpha/Beta in Construct 2
- Create the Product ID’s for your items in the Google Developer Console and insert those ID’s in your C2 project
- Go to Developer Console – Settings – License Testing and add valid Google Mail Accounts as Testers
When your game is released in Alpha/Beta and a player with a License Testing Account downloads the app from the store, then he/she is able to test the IAP without getting charged for it.
In Detail
For the following steps please login into your Google Play Developer Console.
[creativ_button url=”https://play.google.com/apps/publish” icon=”user” label=”Developer Console” colour=”green” colour_custom=”” size=”medium” edge=”straight” target=”_blank”]
License Testers
Firstly visit your “Settings” tab and scroll down till “License Testing”
Add the Google Accounts from your testers to the list. You can create a tester account for your own. Also add this Google Account here then.
[creativ_alertbox icon=”remove-sign” colour=”red” custom_colour=””]Note that you cannot use your developer account in order to test the IAP. You will get an error: “The publisher cannot purchase this product”.[/creativ_alertbox]
Beta/Alpha
Then create your app in your Developer Console and upload the APK file (with the CocoonInApp or the CordovaIAP plugin included) as Beta or Alpha. Then release the app/game.
[creativ_alertbox icon=”remove-sign” colour=”red” custom_colour=””]Note that it will take a while till the beta test link is working. If the link is working, click on “Become Tester” but with your Test Account logged in! Not with your developer account![/creativ_alertbox]
Download & Testing
Once your Test Account is a tester you can download the App from the store. Then start it and debug it. You will not be charged for any purchase made from a test account.