1. Home
  2. Knowledge Base
  3. Android
  4. InApp Products
  5. Android – Test InApp Purchases with Construct 2

Android – Test InApp Purchases with Construct 2

Test your InApp’s

Sandbox Mode

In order to test your InApp Purchase functions perform following steps.

  1. Code your functions in Construct (with CocoonInApp or CordovaIAP plugin)
  2. Build and upload your game as Alpha/Beta in Construct 2
  3. Create the Product ID’s for your items in the Google Developer Console and insert those ID’s in your C2 project
  4. 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”

iap_test_license_tester

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.

iap_test_beta_alpha_apk

[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.

iap_test_screenshot

Updated on June 18, 2016
Was this article helpful?

Related Articles

Not the solution you were looking for?
Click the link below to submit a support ticket
Visist our Forum!

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.