Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat | DONATE
Common In App Billing Interface - Page 3 — Gideros Forum

Common In App Billing Interface

1356

Comments

  • Oooohhh! Nokia store... :D
    Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
    https://deluxepixel.com
  • ar2rsawseenar2rsawseen Maintainer
    True, but I don't have a Nokia X, so can't test it on a real device :)
  • I tried contacting Nokia to see if I could buy one and they said no, only through normal channels. :(

    Worth adding though, big + points against the other devkits. :)
    Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
    https://deluxepixel.com
  • ar2rsawseenar2rsawseen Maintainer
    Well I don't know about big, have I think 2 games published there and there was only 8 downloads in March and 4 this month :D
  • lol. Plus more systems = plus points for devs. :)
    Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
    https://deluxepixel.com
  • Hi,for Amazon ,if I want to unlock product forever,should it be added as
    " Entitlement" or "consumable",or in the end it dose not matter.
    www.zoolax.com
  • Entitlement.
    Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
    https://deluxepixel.com
  • zoolaxzoolax Member
    I found this in documents:
    "
    ab:restore() --raise purchase events for each previously purchases entitled (not consumed) items, raises two events:
    Event.RESTORE_COMPLETE
    Event.RESTORE_COMPLETE <-- should this line be Event.RESTORE_ERROR
    event.error
    "
    Or I am wrong:)
    Thanks
    www.zoolax.com
  • zoolaxzoolax Member
    Hello,for Fortumo IAB ,
    I get 3 codes :

    "Service ID"
    "In-application secret"
    "Secret"

    when using IAB plugin ,

    fortumo:setUp("SERVICE_ID", "APP_SECRET")

    dose "APP_SECRET" refers to "In-application secret" ?
    and what do you do with "Secret"?
    Thanks
    www.zoolax.com
  • ar2rsawseenar2rsawseen Maintainer
    yes APP_SECRED is in application secret

    Hmm, interesting, I think when implementing it, there was no simply secret.

    Even now, going through their docs of implementing, only service id and in-app id are used for Androids.

    So for now I really don't know if there is any thing else for the secret, but if something is not working, let me know and I will retest it ;)

    Likes: zoolax

    +1 -1 (+1 / -0 )Share on Facebook
  • The "IAB Helper not setup" error (crash) occurs if a request is sent to IAB before it has finished it's setup... which is why the demo code shows requests like iab:requestProducts() ) sitting INSIDE the event listener code for the iab:isAvailable() call.

    How do I know this? 'Cos I thought the nesting of stuff inside the isAvailable event handler looked ugly so I put it elsewhere... but then it doesn't work (crashes). No, I didn't really understand the purpose of isAvailable at the time!

    Perhaps IABhandler could behave a little more elegantly if called before it has finished loading...
  • ar2rsawseenar2rsawseen Maintainer
    edited May 2014
    Hello @Skyrocket ;)
    true the crash is ugly, but the problem is that there are many different frameworks underneath and each one behaves differently (I assume you are talking about Google Billing with IAB).

    But what would you say would be a more elegant behavior? Ignoring the call? Adding another ERROR event? I'm open to suggestions :)
  • SinisterSoftSinisterSoft Maintainer
    edited May 2014
    What I do is set a global to a product name then call isAvailable - the event has an if then sequence and if the product name is blank then it does a getproducts, else it tries to buy the item in the variable.

    All you need to do is add and explain a sequence like this to the docs.

    Also put that the moment you call isAvailable then some platforms will prompt for a login (eg iOS) so you should only do it on a button press - not when the app first starts. You also should put in docs that apps need a restore button if you use iOS iap.
    Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
    https://deluxepixel.com
  • i tried getProduct() for Amazon but using SDK tester. it returns nothing. I also test the purchase, the popup dialog appears, the purchase is shown successful, but never dispatch "onPurchaseComplete" event. anyone know why?
  • ar2rsawseenar2rsawseen Maintainer
    @gearball hmm, was testing it some long time ago so don't exactly remember, but you created the local json file etc, right?

    Will have to try to retest it
  • Hi @ar2rsawseen,

    we have solved this problem. The problem is in our side, we forgot to add some configuration on the manifest.

    ps: @gearball is one of our studio crew
    have fun with our games~
    http://www.nightspade.com
  • ArtiomArtiom Member
    edited June 2014
    Hi @ar2rsawseen,
    I have a problem using IAP.
    I'm testing google billing. I can successfully purchase an item but I can't request items. When I call iab:requestProducts() I get "productsError Request Failed" always (after iab:isAvailable() check).
    I think I setup all right because purchase is successful. Please help.

    UPD: I have this in logcat:
    06-18 01:49:01.150: E/IABUtil/Security(6407): Purchase verification failed: missing data.
    06-18 01:49:01.150: W/IabHelper(6407): In-app billing warning: Purchase signature verification **FAILED**. Not adding item.
  • ArtiomArtiom Member
    edited June 2014
    Also it says "purchaseError Unable to buy item (response: 7:Item Already Owned)" after trying to buy the same item. Of course I do iab:setConsumables with internal products ids.
    How peoples using this plugin if its full of bugs?
  • ar2rsawseenar2rsawseen Maintainer
    @Artiom can you post your lua code of using the plugin just to make sure ;)
    For example, there can be a mixup between internal ids and store specific ids.
    That way both consumption and requesting products won't work.

    Also verification failed can usually mean that you are using it on the debug version of the apk not the correctly signed exported apk, right?
  • ArtiomArtiom Member
    edited June 2014
    Hi @ar2rsawseen,
    I made triple check of the ids so thats correct. You can believe me :)
    I have release version of the apk, signed, published as alpha version, same versions in play store and on the phone, my account is assigned to alpha testing and license testing, published store ids, checked public key to be correct and so on.. :)

    Just found this thread:
    http://stackoverflow.com/questions/7070573/android-in-app-billing-security-java-says-signature-verification-failed
    Seems the second answer fixed my problem with requesting products.
    Still I can't purchase second time. Same error. I saw in the code thats consumption request is after purchase. Maybe after purchase there was some connectivity error and consumption is not successful? I think it's better to set consumption before purchasing the product.

    UPD: Just tried to purchase another product and it's ok after several times. Seems that my theory about consumption is right.
  • ar2rsawseenar2rsawseen Maintainer
    @Artiom how do you mean before purchase?
    in lua or in java?

    in lua you should first set ids, then set consumables and only then perform any other actions

    in java it goes like
    try to purchase
    receive purchase event
    if failed dispatch purchase failed event
    elseif not consumable dispatch purchase complete event
    else consume it
    if failed dispatch purchase failed event
    if successful dispatch purchase complete event

    So at any of these points if there is a connectivity error, then purchase will not be completed and can be restored through restore purchase method

    What would be your corrections?

  • ArtiomArtiom Member
    @ar2rsawseen,
    I mean in Java.
    Yes, I read the code more carefully and now I realize that algorithm is correct. Seems I forgot to set consumable item before some test purchase. Not a problem, thanks for help.
  • ArtiomArtiom Member
    edited June 2014
    @ar2rsawseen,
    Something wrong happened. I tried to purchased another item that previously bought several times. Google billing showed me a window with red text something like "You have already own this item". In output it prints "User canceled". I never tried to buy this item without called iab:setConsumables(...) in googlebilling.lua (init).
    But the most weird thing that the first item that I can't buy doesn't show me such window and just prints in output: "purchaseError Unable to buy item (response: 7:Item Already Owned)".
    What happened and why this two items show different errors? :-/

    UPD: Now I can buy first item. The second one do not shows window anymore and outputs the same that the first one was: "purchaseError Unable to buy item (response: 7:Item Already Owned)"
    Some kind of magic.
  • ar2rsawseenar2rsawseen Maintainer
    @Artiom it may take Google servers from half an hour to couple hours to propogate the changes
  • I'm having EXC_BAD_ACCESS issues using either StoreKit or the Common In App Billing plugin. If anybody could shed any light on this I'd appreciate it. Thread here:

    http://giderosmobile.com/forum/discussion/5165/storekit-exc_bad_access#Item_2
  • Just want to add @ar2rsawseen that I have the Common In App Billing plugin working fine with Google Billing from the same codebase. It's almost like the instance is being destroyed as soon as it's being created on iOS but I wonder if it's something more fundamental as I have the same problem when using Gideros' own StoreKit - but do you use that internally in the plugin anyway?

    Even the following simple code causes it:

    iab = IAB.new(iaps[1])
    iab:setProducts({p1 = "coins1000",p2 = "2500",p3 = "5000"})

    I really am at a complete loss here, as soon as I try setProducts (or other methods - tried them just to see if it was an issue with setProducts) I get the EXC_BAD_ACCCESS error.
  • jdbcjdbc Member
    edited July 2014
    I was trying to integrate in-app purchases on a new Android game using this plugin. I have checked manifest file and native libraries, everything seems to be right.

    It returns "Unable to buy item(response 5:Developer error)". I guess this is because I must publish the game as draft at least, is it ok?
  • @jdbc
    Publish it as Alpha Testing/Beta Testing first, and wait for a few hours.

    Likes: ar2rsawseen

    +1 -1 (+1 / -0 )Share on Facebook
  • jdbcjdbc Member
    edited July 2014
    After some hours, I got "Error on requesting products. Request Failed"

    It is not working
    local products = { p1 = "coins_1000",
    				   }
    iab:setProducts(products)
    iab:requestProducts()
    I assume I have to get product list first.

    Any idea?
  • jdbcjdbc Member
    It seems that iab:requestProducts() does not work if you use your editor gmail account.

    I have tested with another mobile and gmail account and it works.

    Likes: boriskey

    +1 -1 (+1 / -0 )Share on Facebook
Sign In or Register to comment.