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

0 favourites
From the Asset Store
a ready made template of Mobile Advert, Google Play and Mobile IAP Plugin,
  • 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

    Hello Sophia,

    The file "intelxdk.config.additions.xml" is automatically created the Construct 2 R195 when u open your project in Intel XDK it will appear there next to your project files.

    The problem is how the AndreasR said, some lines will give an error at compile time ... The question is,, we have to change the lines that generate the error in the compilation by ones that will work,,

    you have to identify what or which lines are in trouble and replace them.

    Since the problem is in the IAP so put this line in place that will work in compiling .....

    "<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: intelxdk plugin: name =" org.apache.cordova.inappbrowser "intelxdk: value =" org.apache.cordova.inappbrowser "/>"

    here are two lines replace them without the quotes.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thank you for you help. I try it... lets see....

  • Got it working!.....The only thing I needed to do was unchecking minify script when exporting. Thanks for all the help guys.

    Also as Reinarte pointed out earlier, in your events you don't need to check for 'has product' or anything, just make an event when touched...-> purchase product.

  • Congrats!!!

  • I was able to get the In-App Purchase working. However, the purchase is not remember. When the App is closed and re-opened, the user does not have the In-App Product any more. Trying to buy it a second time results in an "Alert" message via the browser object I set up (browser>Alert>Purchase failed).

    I went through all the tuts, read and reread forum posts & the phonegap instructions but can't figure it out. Does anybody spot where I did the mistake? I would appreciate any hint so much

    Here are screenshots of the Google Console In-App section & C2 of all actions related to the In-App Purchase:

    [attachment=1:37b2y2fz][/attachment:37b2y2fz]

    [attachment=0:37b2y2fz][/attachment:37b2y2fz]

    [attachment=2:37b2y2fz][/attachment:37b2y2fz]

  • ddaan9 & Reinarte It would help me a lot to have you guys give me a line what you think the problem is. THANK YOU!

  • I was able to get the In-App Purchase working. However, the purchase is not remember. When the App is closed and re-opened, the user does not have the In-App Product any more. Trying to buy it a second time results in an "Alert" message via the browser object I set up (browser>Alert>Purchase failed).

    I went through all the tuts, read and reread forum posts & the phonegap instructions but can't figure it out. Does anybody spot where I did the mistake? I would appreciate any hint so much

    Here are screenshots of the Google Console In-App section & C2 of all actions related to the In-App Purchase:

    [attachment=1:20wy2khg][/attachment:20wy2khg]

    [attachment=0:20wy2khg][/attachment:20wy2khg]

    [attachment=2:20wy2khg][/attachment:20wy2khg]

    Sorry but can't see the problem. I also had no experience with IAP, so I would recommend making a new topic and hope that someone sees the problem.

    Good luck!

  • I was able to get the In-App Purchase working. However, the purchase is not remember. When the App is closed and re-opened, the user does not have the In-App Product any more. Trying to buy it a second time results in an "Alert" message via the browser object I set up (browser>Alert>Purchase failed).

    I went through all the tuts, read and reread forum posts & the phonegap instructions but can't figure it out. Does anybody spot where I did the mistake? I would appreciate any hint so much

    Here are screenshots of the Google Console In-App section & C2 of all actions related to the In-App Purchase:

    [attachment=1:1n163r6q][/attachment:1n163r6q]

    [attachment=0:1n163r6q][/attachment:1n163r6q]

    [attachment=2:1n163r6q][/attachment:1n163r6q]

    Hello Cybersurfer5000.

    Very calm, stay quiet and let's think about the logic.

    In your project when you purchase something is released right?

    So when you use the "product has" the same thing should be released also understand?

    The purchase failed because you already have it stored.

    If you clear the cache you will be able to do it again.

    The point is that you have to know how to work the logic to get the result that you expect.

    you can be more detailed and have more pictures to be able to help you.

  • Reinarte: Thanks for your prompt response!!!

    Here are some details: it is a single, managed, non-consumable in-app product.

    To your questions: yes, the product with product ID "xyz" is released when purchased. As far as I understand, the purchase of product "xyz" is stored in the Google Play account of the user.

    With the condition 'Has product' "xyz", the app checks on Google Play, if the user has purchased product "xyz". If that is true, an action in the app is triggered.

    My logic is: user buys product "xyz" once > Google stores purchase of product "xyz" indefinitely > app recognizes that product "xyz" has been purchased > action triggered

    If the user closes app or uninstalls the app and re-installs it later > the app still recognizes that product "xyz" has been purchased in the past > action triggered

    I am not sure, where I make an error in the logic. Are you saying, I cannot use the "Has product" condition for non-consumable products? If so, what would be the correct condition?

    Thank you in advance, Reinarte!!!

    PS: I understand the second issue with the failed purchase on the second attempt. That makes sense to me.

  • Reinarte: Thanks for your prompt response!!!

    Here are some details: it is a single, managed, non-consumable in-app product.

    To your questions: yes, the product with product ID "xyz" is released when purchased. As far as I understand, the purchase of product "xyz" is stored in the Google Play account of the user.

    With the condition 'Has product' "xyz", the app checks on Google Play, if the user has purchased product "xyz". If that is true, an action in the app is triggered.

    My logic is: user buys product "xyz" once > Google stores purchase of product "xyz" indefinitely > app recognizes that product "xyz" has been purchased > action triggered

    If the user closes app or uninstalls the app and re-installs it later > the app still recognizes that product "xyz" has been purchased in the past > action triggered

    I am not sure, where I make an error in the logic. Are you saying, I cannot use the "Has product" condition for non-consumable products? If so, what would be the correct condition?

    Thank you in advance, Reinarte!!!

    PS: I understand the second issue with the failed purchase on the second attempt. That makes sense to me.

    Hello Cybersurfer5000,

    I will try to explain the way I understand.

    I know what products managed on Google is stored information email the person who made the purchase, but in the last update Billing API V3 In-app there is a problem because the storage is done locally.note at the end "Local Caching"

    I believe that's why I could never restore a purchase after reinstalling App.

    I already tried 3 different plugins and none managed to restore (CocoonJS, PhonegapIAP and IAP), so I believe it is not possible until someone shows me that it is possible.

    I have a game to be launched soon and I use it a extrategia to be able to restore purchases in the app,

    when the purchase is made is given also an achievement for the User, so I do the verification of achievement and release the User.

    this way works by verifying the achievement.

    that's the way I'm doing ....

    My game is incomplete in (mode site)

    GooglePlay - assure you that if you buy Part 2, you can reinstall the app that do not need to buy part 2 again ...

  • > Reinarte: Thanks for your prompt response!!!

    >

    > Here are some details: it is a single, managed, non-consumable in-app product.

    >

    > To your questions: yes, the product with product ID "xyz" is released when purchased. As far as I understand, the purchase of product "xyz" is stored in the Google Play account of the user.

    > With the condition 'Has product' "xyz", the app checks on Google Play, if the user has purchased product "xyz". If that is true, an action in the app is triggered.

    >

    > My logic is: user buys product "xyz" once > Google stores purchase of product "xyz" indefinitely > app recognizes that product "xyz" has been purchased > action triggered

    > If the user closes app or uninstalls the app and re-installs it later > the app still recognizes that product "xyz" has been purchased in the past > action triggered

    >

    > I am not sure, where I make an error in the logic. Are you saying, I cannot use the "Has product" condition for non-consumable products? If so, what would be the correct condition?

    >

    > Thank you in advance, Reinarte!!!

    >

    > PS: I understand the second issue with the failed purchase on the second attempt. That makes sense to me.

    >

    Hello Cybersurfer5000,

    I will try to explain the way I understand.

    I know what products managed on Google is stored information email the person who made the purchase, but in the last update Billing API V3 In-app there is a problem because the storage is done locally.note at the end "Local Caching"

    I believe that's why I could never restore a purchase after reinstalling App.

    I already tried 3 different plugins and none managed to restore (CocoonJS, PhonegapIAP and IAP), so I believe it is not possible until someone shows me that it is possible.

    I have a game to be launched soon and I use it a extrategia to be able to restore purchases in the app,

    when the purchase is made is given also an achievement for the User, so I do the verification of achievement and release the User.

    this way works by verifying the achievement.

    that's the way I'm doing ....

    My game is incomplete in (mode site)

    GooglePlay - assure you that if you buy Part 2, you can reinstall the app that do not need to buy part 2 again ...

    my urls were removed, I need 300 reputation.

    developer. android.com/google/play / billing / api. html # managed

    reinarte. with. br

    play.google. com / store / apps / details? id = com.reinarte.stroke

  • I like your game "Stroke". Really solid and fun!

    That strategy with the achievement sounds interesting.

    What is the condition and action you use in C2?

    Do you use the Phonegap IAP plugin?

    How do you set it up in Google Play Developer Console?

    Thanks in advance! Sophia

  • I like your game "Stroke". Really solid and fun!

    That strategy with the achievement sounds interesting.

    What is the condition and action you use in C2?

    Do you use the Phonegap IAP plugin?

    How do you set it up in Google Play Developer Console?

    Thanks in advance! Sophia

    Thank you Sophia.

    Thanks for the 5 stars in googleplay

    The site version is a small sample, it is still small in relation to the project development.

    What is your version of Android?

    Soon I will update the site with new modifications, wait ....

  • I have Android 4.1.1.

    Could you tell me more about the "achievement", Reinarte?

    Maybe that is a way for me to solve my problem with the IAP plugin.

    What is the condition and action you use in C2?

    Do you use the Phonegap IAP plugin?

    How do you set it up in Google Play Developer Console?

  • I have Android 4.1.1.

    Could you tell me more about the "achievement", Reinarte?

    Maybe that is a way for me to solve my problem with the IAP plugin.

    What is the condition and action you use in C2?

    Do you use the Phonegap IAP plugin?

    How do you set it up in Google Play Developer Console?

    I use Phonegap IAP, PhonegapGame and GooglePlay

    It took me a lot to stay as I would like, but it is not as I would like.

    In my game need to log two times, one for GooglePlay (web mode) and one for PhonegapGame (Android mode)

    I need this because each plugin has the commands I need and can not do everything with PhonegapGame yet,,, it does not have the command to verify that an achievement is unlocked,,,, GooglePlay does the checking,

    at the time the purchase is carried out also earn an achievement, so every time the person logging into the game it checks whether the User has the achievement.

    I Will not try to restore purchases because I never saw it work after reinstall the game.

    Google play console has a place for you to configure a web client that will work with the GooglePlay

    but first you need to create a game on google play console, go following the steps carefully, you're not required to do anything just make the necessary achievements, no need to do missions, events, leaderboard,

    if you get the pups google achievements will give you a key to be unlocked in your app,,,,,,

    the PhonegapGame or GooglePlay plugin has the command unlock the achievement,

    once unlocked the User to have whenever you login and you have the googleplay "request list of all achievements."

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