CocoonIO Restore Purchases

0 favourites
  • 13 posts
From the Asset Store
You think you can guess the character’s name?! Then let’s see how smart you are!
  • Can anyone confirm that restore purchases works for CocoonIO?

    I've managed to set up everything regarding IAP with Cordova IAP for Intel XDK, but struggeling to set up restore purchases with CocoonIO. Not sure if I'm missing something or this feature does not work?

    I tried with Android.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • AndreasR you're the Cocoon master . Can you confirm that it works? Or you haven't tested this part?

  • Alright - sorry for bothering. I've managed to make it work!

  • AndreasR you're the Cocoon master . Can you confirm that it works? Or you haven't tested this part?

    Yes it does

    I tested it in my Match3 game

    Regards

    Andy

  • Well actually I need a hand There are weird things going on with my Cocoon IAP implementation.

    1. When I trigger "restore purchases", then it triggers "on product purchase completed" for every product which has been bought in the past.

    2. Even though I recieve a restore purchases successful message. "Has product" still returns false.

    3. CocoonInApps.ProductTitle breaks the script

    In your example you provide a Product ID (which is a string) as a parameter of CocoonInApps.ProductTitle. However description of this function says it has to be a number.

    I think this is why my script breaks. And maybe even all the weirdies happen.

    If you have IAP implemented in your working project. Could you please share your working implementation? Or point me to the tutorial/documentation? I can't find any official info regarding what the "Nth product" means. Is it Nth purchased product of all times or it's the sequence of products added to "Fetch products from store" or Nth of the current session or...?

    I would be greatful if you could clarify this.

    Thanks

  • Hi,

    Yes you are right. It triggeres the On purchase completes trigger instead of the 'has product'. Same is with the description/title. I did use the 'on completed' and 'has product' as 'or' block, so I haven't noticed that.

    Thank you!

    I'm building a testcase for Imanol, so this can be fixed.

    I keep you posted

    Regards

    Andy

  • Hi,

    Yes you are right. It triggeres the On purchase completes trigger instead of the 'has product'. Same is with the description/title. I did use the 'on completed' and 'has product' as 'or' block, so I haven't noticed that.

    Thank you!

    I'm building a testcase for Imanol, so this can be fixed.

    Actually it triggers "On purchase complete" instead of nothing. When I run "Restore purchases" I expect plugin just to download information to the memory and do nothing else. Then once "Restore purchases" is done I expect "Has product" (in Cocoon it's called "Is product purchased") to be able check if product has been purchased before or not.

    So to clarify:

    ### issue 1 ###

    Function: Restore purchases

    Current behaviour: It triggers "On purchase complete" for every product which has been purchased in the past.

    Expected behaviour: Download information about purchased products. Triggers nothing by itself.

    ### issue 2 ###

    Function: ProductTitle, ProductPrice (and other which requires Nth product parameter)

    Current situation: Require Nth product integer parameter

    Expected situation: Require Product ID string parameter (or documentation of how this should be properly used with Nth integer)

    I'm not sure whi Imanol is but I guess is someone from CocoonIO team? Could you please share the Cocoon forum issue report link here if you created any? Or should I do it?

  • I'm on it, but issue 2 is not an issue.

    I'm writing a doc file at the moment, showing you how to access the plugin expressions. It's a little bit confusing, I have to admit that. But with the docs updated, it should be clear then.

    About issue 1, yes you are right. I already have sent a message to Imanol.

    I checked the plugin code of my own, but I couldn't find an answer why it calls the "On purchase completed" action. So I guess it's something located in the cloud plugin "InAPP for Google Play".

    I keep you posted.

  • ### issue 2 ###

    Function: ProductTitle, ProductPrice (and other which requires Nth product parameter)

    Current situation: Require Nth product integer parameter

    Expected situation: Require Product ID string parameter (or documentation of how this should be properly used with Nth integer)

    I'm not sure whi Imanol is but I guess is someone from CocoonIO team? Could you please share the Cocoon forum issue report link here if you created any? Or should I do it?

    Hi,

    the docs are now updated. so you can see how you can access the expressions.

    https://shatter-box.com/knowledgebase/c ... ocument-12

    I'll also publish the new code example for construct 2, but it's not done yet.

    I'll keep you posted!

    Edit: Now the C2 example file is ready as well

    https://shatter-box.com/download/cocoon ... truct2.zip

    Please see the docs in order to run it on an android device

    https://shatter-box.com/download/cocoon ... readme.pdf

    Regards

    Andy

  • Thank you AndreasR! I will give it a try today. I think I would never guess that it's ordered alphabetically... I really thought it's something related to purchase order or market initialization . Thanks a lot.

  • Thank you AndreasR! I will give it a try today. I think I would never guess that it's ordered alphabetically... I really thought it's something related to purchase order or market initialization . Thanks a lot.

    Sure, you're welcome

    Just let me know if you are facing any issues then.

    Regards

    Andy

  • Alright! Everything works now except "has product". This doesn't work no matter if I user index or product id. It looks like this function is simply corrupted. Anyway thanks to the "on product successfully purchased" triggered by "Restore purchases" I've managed to make a workaround for "Has product".

    So finally after several days of testing everything works. Thanks again

  • Alright! Everything works now except "has product". This doesn't work no matter if I user index or product id. It looks like this function is simply corrupted. Anyway thanks to the "on product successfully purchased" triggered by "Restore purchases" I've managed to make a workaround for "Has product".

    So finally after several days of testing everything works. Thanks again

    You're welcome. I wrote Imanol a message about the Has product issue.

    Once I know more, I'll let you know.

    Regards

    Andy

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