A Lot Of Problems With The Official IAP On Android

Report Construct 2 bugs here.

Post » Tue Mar 01, 2016 12:40 pm

Problem Description

By following the recommended tutorial and exporting Crosswalk using Intel Xdk there are many problems with the Official IAP Plugin. These are the 6 I came across, there might be more.

Bug 1. IAP expression: ProductName(productid). Does not display product name (when not purchased product)

Bug 2. IAP expression: ProductPrice(productid). Does not display price. (when not purchased product)

Bug 3. When purchasing product and googles purchase page opens, closing the googles page causes the whole app to freeze (Not every time. It might be 2nd time the purchase screen is opened or more). Clicking the purchase button works and the purchase screen pops up, the rest of the app freezes when the Googles purchase screen is closed.

Bug 4. IAP properties: Test mode. Test mode is not working and purchases the product when Test Mode is set to yes.

Bug 5. IAP conditions: Has product is continued to be returned when product has been refunded through google play.

Bug 6. IAP conditions: Invert Has product continues to be returned when user does have product.

Attach a Capx

https://drive.google.com/file/d/0B-3-x6 ... sp=sharing

Description of Capx

Demonstrates problems with official IAP

Steps to Reproduce Bug
    Bug 1. Use IAP expression: ProductName(productid).

    Bug 2. Use IAP expression: ProductPrice(productid).

    Bug 3. Click purchase button and close the googles purchase screen. Repeat several times (sometimes it freezes after 2 tries, other time it could freezes after 8 tries) until the app freezes and only purchase button will work (everything else will freeze completely).

    Bug 4. Make a purchase in Test mode.

    Bug 5. Refund the purchase through google play and use IAP condition Has product.

    Bug 6. Purchase product using official IAP and invert condition Has product.

Observed Result
Bug 1. Does not display ProductName

Bug 2. Does not display ProductPrice

Bug 3. App freezes

Bug 4. Payment went through

Bug 5. Shows user still IAP has product after a refund.

Bug 6. Shows user does not have product when he really does.


Expected Result

Bug 1. Display ProductName

Bug 2. Display ProductPrice

Bug 3. App not freeze when purchase screen closed multiple times.

Bug 4. Test mode should not charge the credit card.

Bug 5. IAP should not show has product after a refund.

Bug 6. IAP should show that the user does not have product.





Operating System and Service Pack
Android Lollipop

Construct 2 Version ID
r221
B
16
S
6
Posts: 29
Reputation: 1,196

Post » Fri Mar 04, 2016 10:56 am

Bug 1 & Bug 2: Store available and store listing have to come back true in order to get these. When first starting up the project they don't always get returned immediately. I put in a loop where it would attempt to get the listing. If it failed, it would wait 2 seconds and try again. If it failed 5 times, it would assume that the store simply wasn't there and proceed. Yes it's an issue but I could find no other way to get it to work consistently.

Bug 3: don't have this problem

Bug 4: Correct AFAIK. I've tried with test mode on and off and makes no difference. If you want to do test purchases, you'll have to set up beta testers and add the email they use to log into google. Then, it will do the purchases but not deduct money from any account.

Bug 5. I believe this has to do with Android caching the purchase info. If you cancel the purchase in the Google Dev Console it may take a while for it to get to the Android device. One test I haven't done is to cancel the purchase then turn the phone off and back on to clear that cache. Otherwise, it will eventually come back as false.

Bug 6. I haven't tried an 'inverse' as I can't even consistently get the has product result on starting my app.

Here's the thread I've been trying to get help on: viewtopic.php?t=165720
B
15
S
6
Posts: 124
Reputation: 1,737

Post » Tue May 24, 2016 8:20 am

Ashley, bump since the other thread was closed down.
B
16
S
6
Posts: 29
Reputation: 1,196

Post » Wed May 25, 2016 9:30 pm

Just spent like 30 minutes making a bug report about IAP but I got logged out so I'm just going to reply here. When I have the IAP in a project I can no longer preview on android (over wifi) at all, it just crashes. This is sudden and I can reproduce the error in a completely empty capx with the IAP plugin added in the project. As soon as I remove it it works fine. This problem doesn't show up in preview on PC or iOS. It seems to have something to do with the cws-buy.js file generated by the IAP plugin.

Furthermore I had to switch to a 3rd party IAP plugin because I was experiencing many of the bugs in this post. It's a shame because 3rd party plugins don't have the best support and I would really like to use the included plugins exclusively.
I know this isn't proper bug report format but I hope this info helps resolve this.
B
6
S
3
Posts: 7
Reputation: 604


Return to Bugs

Who is online

Users browsing this forum: No registered users and 1 guest