0 Favourites

Done setting up IAP Phonegap, but IAP is not working???

  • Hi guys,

    I'm trying to setup IAP in my app, but for some reason it isn't doing anything. This is what I have done. I made a shop in my game. there are three products: skip level one star, skip level two stars, skip level three stars. They all worked great without the plugin. So I added the phonegap IAP plugin (cranberries) in my game, filled in my app id for the plugin, created the products on the Google play developer console, as unmanaged. Activated the products. Took the product id's and put them in construct. Then exported to cardova. Compiled with Intel XDK to Crosswalk, without adding any plugin or something. Then published the APK in Alpha.

    I now have a tester account and installed the game. The shop opens, but when i click on the productsprites nothing happens. No Google Play pop up, to purchase the product. I waited a day, still nothing. Did i do something wrong in the construct actions?

    check the attachments for screenshots of construct and google play.

    Thanks in advance!

  • You need to add the Cordova plugin in the Intel XDK . Are you using Cranberry Games plugin. You can find a tutorial on how to add the plugin at software.intel.com/en-us/html5/articles/iap-in-intel-xdk

  • You need to add the Cordova plugin in the Intel XDK . Are you using Cranberry Games plugin. You can find a tutorial on how to add the plugin at software.intel.com/en-us/html5/articles/iap-in-intel-xdk

    Thanks for the link. I will give that a try!

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • You need to add the Cordova plugin in the Intel XDK . Are you using Cranberry Games plugin. You can find a tutorial on how to add the plugin at software.intel.com/en-us/html5/articles/iap-in-intel-xdk

    I found some info, saying that when you use cranberry's phonegap iap plugin you don't have to alter anything in intelXDK. Is this right?

  • Anyone?

  • In a way both are correct.

    When you import into XDK using the option "Import an existing HTML5 template" (you will see this when you try to create a project in intel XDK), the phonegap IAP plugin code is added automatically.

    I understood it better after going through the relevant shatter-box tutorial / how-to. you can find it on their website.

  • In a way both are correct.

    When you import into XDK using the option "Import an existing HTML5 template" (you will see this when you try to create a project in intel XDK), the phonegap IAP plugin code is added automatically.

    I understood it better after going through the relevant shatter-box tutorial / how-to. you can find it on their website.

    Thank you for your response, but i just cannot figure out what is causing the problem. When i look at the pictures i can't see anything wrong, and I read almost every tutorial and forum post that you can find. All are showing the same steps as I followed. Really is annoying, this is the last thing i need to fix before I can publish....

  • Hello friend,

    I would like to try to help you.

    you are using the plugin Phonegap IAP 2.0.31? Construct 2 and the R195?

    before compiling the project in Intel XDK onserve what is written in the file

    intelxdk.config.additions.xml

    if that party is present can be to solve in the next compilation

    <intelxdk: pluginintelxdk:name="https://github.com/cranberrygame/com.cranberrygame.phonegap.plugin.iap#4306f62a0d9683eca8d8be135533dd92f6a446c1"intelxdk:value="https://github.com/cranberrygame/com.cranberrygame.phonegap.plugin.iap#4306f62a0d9683eca8d8be135533dd92f6a446c1" />

    <intelxdk: intelxdk plugin: name = "org.apache.cordova.inappbrowser" intelxdk: value = "org.apache.cordova.inappbrowser" />

    aki are 2 lines only.

    Errado?

  • Hello friend,

    I would like to try to help you.

    Another tip, you do not need to put "has product" and need not "store is avaliable."

    you can go straight, when you touch the object, buy the product

  • Hello friend,

    I would like to try to help you.

    you are using the plugin Phonegap IAP 2.0.31? Construct 2 and the R195?

    before compiling the project in Intel XDK onserve what is written in the file

    intelxdk.config.additions.xml

    if that party is present can be to solve in the next compilation

    <intelxdk: pluginintelxdk:name="https://github.com/cranberrygame/com.cranberrygame.phonegap.plugin.iap#4306f62a0d9683eca8d8be135533dd92f6a446c1"intelxdk:value="https://github.com/cranberrygame/com.cranberrygame.phonegap.plugin.iap#4306f62a0d9683eca8d8be135533dd92f6a446c1" />

    <intelxdk: intelxdk plugin: name = "org.apache.cordova.inappbrowser" intelxdk: value = "org.apache.cordova.inappbrowser" />

    aki are 2 lines only.

    Errado?

    Thank you for your help.

    I do use Phonegap IAP 2.0.31 and Construct 2 R195. I removed the extra subevents like you said in your other post. When i check the files, i can see intelxdk.config.additions.xml.

    Since I'm not a coder i have no clue where i should put:

    <intelxdk: pluginintelxdk:name="https://github.com/cranberrygame/com.cranberrygame.phonegap.plugin.iap#4306f62a0d9683eca8d8be135533dd92f6a446c1"intelxdk:value="https://github.com/cranberrygame/com.cranberrygame.phonegap.plugin.iap#4306f62a0d9683eca8d8be135533dd92f6a446c1" />

    <intelxdk: intelxdk plugin: name = "org.apache.cordova.inappbrowser" intelxdk: value = "org.apache.cordova.inappbrowser" />

    Can you guide me? Really appreciate you taking the time to help me!!!!!

    PS: I do minify the script when exporting, is that ok?

  • > Hello friend,

    > I would like to try to help you.

    > you are using the plugin Phonegap IAP 2.0.31? Construct 2 and the R195?

    > before compiling the project in Intel XDK onserve what is written in the file

    >

    > intelxdk.config.additions.xml

    >

    > if that party is present can be to solve in the next compilation

    >

    > <intelxdk: pluginintelxdk:name="https://github.com/cranberrygame/com.cranberrygame.phonegap.plugin.iap#4306f62a0d9683eca8d8be135533dd92f6a446c1"intelxdk:value="https://github.com/cranberrygame/com.cranberrygame.phonegap.plugin.iap#4306f62a0d9683eca8d8be135533dd92f6a446c1" />

    > <intelxdk: intelxdk plugin: name = "org.apache.cordova.inappbrowser" intelxdk: value = "org.apache.cordova.inappbrowser" />

    >

    > aki are 2 lines only.

    > Errado?

    >

    Thank you for your help.

    I do use Phonegap IAP 2.0.31 and Construct 2 R195. I removed the extra subevents like you said in your other post. When i check the files, i can see intelxdk.config.additions.xml.

    Since I'm not a coder i have no clue where i should put:

    <intelxdk: pluginintelxdk:name="https://github.com/cranberrygame/com.cranberrygame.phonegap.plugin.iap#4306f62a0d9683eca8d8be135533dd92f6a446c1"intelxdk:value="https://github.com/cranberrygame/com.cranberrygame.phonegap.plugin.iap#4306f62a0d9683eca8d8be135533dd92f6a446c1" />

    <intelxdk: intelxdk plugin: name = "org.apache.cordova.inappbrowser" intelxdk: value = "org.apache.cordova.inappbrowser" />

    Can you guide me? Really appreciate you taking the time to help me!!!!!

    PS: I do minify the script when exporting, is that ok?

    Hello friend,

    my file "intelxdk.config.additions.xml" is so.

    <intelxdk: pluginintelxdk:name="https://github.com/cranberrygame/com.cranberrygame.phonegap.plugin.iap#4306f62a0d9683eca8d8be135533dd92f6a446c1"intelxdk:value="https://github.com/cranberrygame/com.cranberrygame.phonegap.plugin.iap#4306f62a0d9683eca8d8be135533dd92f6a446c1" />

    <intelxdk: intelxdk plugin: name = "org.apache.cordova.inappbrowser" intelxdk: value = "org.apache.cordova.inappbrowser" />

    but in your project in the construct 2 PhonegapIAP plugin must be configured with your key to shopping at GooglePlay

  • <intelxdk:plugin intelxdk:name="https://github.com/cranberrygame/com.cranberrygame.phonegap.plugin.iap#4306f62a0d9683eca8d8be135533dd92f6a446c1" intelxdk:value="https://github.com/cranberrygame/com.cranberrygame.phonegap.plugin.iap#4306f62a0d9683eca8d8be135533dd92f6a446c1" />

    <intelxdk:plugin intelxdk:name="org.apache.cordova.inappbrowser" intelxdk:value="org.apache.cordova.inappbrowser" />

  • ddaan9: did u solve the issue? I have the same and I still haven't figured out what causes it.

  • Reinarte: I have exactly the same issue as ddaan9. However, I don't have the file "intelxdk.config.additions.xml". I exported using Cordova and imported it into Intel XDK. I have the Phonegap IAP 2.0.32 plugin and C2 R195.

    I hope you have a quick hint where I have to look to solve the issue.

    Cheers

    Sophia

  • Hi

    I've made a tutorial for that <img src="{SMILIES_PATH}/icon_e_wink.gif" alt=";)" title="Wink">

    http://shatter-box.com/knowledgebase/phonegap-iap/

    There are two ways to import your games into Intel XDK.

    http://shatter-box.com/knowledgebase/ho ... crosswalk/

    For both methods you need to update the '...additional.xml' (shown in the tutoiral for IAP under 'Show how to add the plugin manually')

    For some reasons C2 adds a wrong code (not for IAP, but for Game and Facebook) to this file. So always check the xml code.

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