How do I do in app purchase in test mode?

0 favourites
  • 13 posts
From the Asset Store
Create your own casino app and import it to Google Play and the App Store.
  • I tried both the official IAP plugin and the CocconJs plugin, set them to test(sandbox) mode enabled, and compiled with CocoonJs 2.02 as an Android app. But when I test my in app purchase, Google charges my credit card! Does anyone have the same problem? If you don't have this problem before, could you try this again and see if it is due to some new updates Google has done? Thanks a lot!

  • Anyone has implemented in app purchase in Google Play recently? Thanks.

  • Ping again.

    I am not looking for a solution, just want to know if others have similar problem(then I just have to face it) or I am the only one facing the problem(then I have to work harder to figure out a solution). Any reply will be appreciated. Thanks.

  • Please don't bump threads, it's not good.

  • Just set 'Store Sandbox' enable and set up your Items and prepare your game with this tutorial https://www.scirra.com/tutorials/645/in ... g-cocoonjs

    Then upload it to your Play Store Account and DOWNLOAD it via the Play Store (Otherwise IAP doesn't work). And you can purchase your items without getting charged. If you feel ready deactivate the Sandbox Mode and store is live <img src="{SMILIES_PATH}/icon_e_wink.gif" alt=";)" title="Wink">

  • AndreasR

    Thanks for the reply. I follow every step in the tutorial and I can make in app purchase, just the "Sandbox" mode is not working no matter I set it to enabled or disabled. My credit card is being charged...

    So you can have the sandbox mode working? I tried to the official IAP and the CocoonJS plugin, but both are charging my credit card despite having "sandbox" or "test mode" on...

  • Please try to enable the sandbox mode, compile the game, upload it on the store (in beta phase or something like that) install it on your device and trigger a purchase. But do not confirm it with 'ok' and make a screen shot for me.

    There should be a text saying you 'Test: this will not charge you' or something like that. You also should get a google wallet invoice. There you also can read that it was just a for testing (it worked for me).

    https://wallet.google.com/manage/?refer ... filter=ALL

    Google will cancle the transaction after a few days/weeks of the test purchase. Then you'll get your money back.

  • AndreasR

    Thanks AndreasR. I have sent you a PM.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • AndreasR

    Thanks AndreasR. I have sent you a PM.

    I've answered you

  • any info on this, just been testing in app purchases too and google charged me too, I got everything on testmode and added a fresh google account to my testers

  • any info on this, just been testing in app purchases too and google charged me too, I got everything on testmode and added a fresh google account to my testers

    Please see here.

    https://www.scirra.com/tutorials/5013/c ... out-paying

    Note, your game must be in alpha/beta!

    This works for all platforms, not only for CocoonIO

    Regards

    Andy

  • Thanks for the reply, but I already fixed it.

    Your link didn't help at all though, as I know how to set up the IAP, and it was working correctly, apart from the fact that I got charged. I clearly wrote that it worked, that my app was in testmode AND that I got testaccounts. I did however not mentioned that my app was ALSO in Alpha test mode.

    I thought the alpha channel was specifically for this kind of testing, and as long as I had the user’s Gmail address on the whitelist, the transaction wouldn’t post. Wrong. The whitelist is ignored for published APK versionCodes.

    In fact, it’s even a bit worse than that – the whitelist is ignored for all versionCodes less than or equal to anything published. Let me illustrate that with a concrete example:

    1. The production versionCode of my app is 9 – that’s my baseline, before I started implementing IAB.

    2. After I had a first cut of IAB done – with versionCode 10 – I published it to my alpha-test group and had a whitelisted user try it. He got charged, because 10 wasn’t unpublished.

    3. Learning from these mistakes, I uploaded a later version (13) to Google Play, but did not publish it. I then emailed the APK to some whitelisted testers, who successfully used the IAB feature without being charged.

    4. Moving closer to release, I built versionCode 14 and published it to beta. I fully expect users of this version to be charged, and they are.

    5. However: the next day, one of my whitelisted test group from step 3 – still on versionCode 13 – tried out the IAB and got charged for it. My best explanation for this is that, even though 13 is still unpublished, the whitelist is ignored, because 14 is published.

    source: https://sterlingudell.wordpress.com/201 ... n-android/

  • Thanks for pointing that out.

    You easily can see if you get charged or not.

    It shows "This is a test purchase, you will not be charged" message if you try to purchase an item.

    I know this has nothing to do with thing about the version codes. Just wanted to say that

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)