How to deal with in app purchases?

Hi,

I have problems with IAP badger and I already posted about a problem of a window opening twice (which is my problem). I have also already contacted the author of IAP badger but I could not find any solution to fix the issue.

Is there any other way to deal with in-app purchases?

Thanks in advance for your replies because I really get desperate

Pierre

Hi Pierre,

Using IAP Badger is completely optional: you can always implement IAP directly using the Corona plugins for Apple IAP, Google IAP, and/or Amazon IAP. Which of these platforms do you intend to target?

Brent

Please see my reply in your other post and see if that resolves the issue

Thanks for your reply.

I intend to target Apple and Google.

Do you know any tutorial or code for the implementation of IAPs?

Pierre

I have just implemented IAP directly using the Corona plugins for Apple IAP and Google IAP but unfortunately, I still get the same issue…

Has anyone already encountered this kind of issue?

It is one of the last thing I have to do before publishing and I have already spent a lot of time trying to solve the problem unsuccessfully…

As far as I know, you are the only person experiencing this. You have to be executing code twice in your app. Perhaps  you have something in the system event handler (suspend, resume, start) that’s executing a function you’re calling directly.

Rob

Hi,

Could anyone please test this project which causes two windows to open?

Thanks in advance

Pierre

Has anyone tried that code?

I briefly looked over it and didn’t see anything obvious. Hopefully I’ll get some time today to look at it.

Ok, thank you very much.

Can you build and post APK?  I’m getting an authentication error.  Otherwise I don’t see anything obvious in the code that would cause the window to pop up twice.

Yes, here it is:

Sorry, in fact, I cannot attach it to the message… It says: "Error You aren’t permitted to upload this kind of file".

You will have to upload the APK somewhere and post a URL here.

Also I looked at the code you sent and it’s not a valid test case. I can’t just build it and run it. For instance I doubt your product is really named “productName” in your store.purchase() API calls.

Since I don’t have enough information to test against your IAP setup, I went ahead and tested against the Android default items:

android.test.purchased

I hit the purchase button, I got one dialog set and was able to purchase the fake item. Of course it errored out when trying to check licensing which I expected. I can only test this on Android since Apple doesn’t have a similar fake product and I’d have to setup all your items.

That said there is a bug in the transaction listener for revoking the transaction. It never calls finish transaction.

If you want me to test against your installation, I’ll need the licensing key, your AppID that you’re building with and the product name you’re trying to buy.

Rob

Rob

Thanks for your reply. I will post a URL very soon.

Rob, could I send you the information you ask for personnally? I noticed that we cannot send you personal messages.

Pierre

Check your email.

Rob, do you want the information for the app I created specifically for the test of IAPs or for my real game?

I need whatever I need to put in the app and build it and see the problem.

I have sent to you the information on the app I created specifically and whose code was published not long ago in the ZIP file.