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 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
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
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 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
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...
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
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?
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.
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?
@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?
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.
@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
@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.
@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.
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:
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?
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.
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?
Comments
https://deluxepixel.com
Worth adding though, big + points against the other devkits.
https://deluxepixel.com
https://deluxepixel.com
" Entitlement" or "consumable",or in the end it dose not matter.
https://deluxepixel.com
"
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
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
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
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...
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
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.
https://deluxepixel.com
Will have to try to retest it
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
http://www.nightspade.com
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.
How peoples using this plugin if its full of bugs?
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?
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.
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?
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.
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.
http://giderosmobile.com/forum/discussion/5165/storekit-exc_bad_access#Item_2
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.
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?
Publish it as Alpha Testing/Beta Testing first, and wait for a few hours.
Likes: ar2rsawseen
It is not working
Any idea?
I have tested with another mobile and gmail account and it works.
Likes: boriskey