Test your InApp’s
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.
For the following steps please login into your Google Play Developer Console.Developer Console
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.
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”.
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.
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!
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.