Official IAP Trigger Events Not Working Dec 2015

Get help using Construct 2

Post » Mon Nov 30, 2015 9:38 pm

Hey Everyone,

I am having a bit of trouble with the native IAP plugin which I hope one/some of you more experienced users will be able to help me with.

Background

I have created a simple game that I want to release with IAP’s to remove the Ads, pretty standard.

I am using:

• Construct 2 r218.
• Official IAP plugin
• Intel XDK (fully up to date on making this post)
o Android InAppBilling (com.mcm.plugins.androidinappbilling)
o Google Play Services for Android (com.google.playservices)
o Phonegap Admob plugin (com.cranberrygame.phonegap.plugin.ad.admob)
o Device (cordova-pligin-device)

I have created a beta test app on google play and registered the in app purchase ID’s.

When I publish the app in closed beta and install it on my phone the price of the IAP is not displayed, using Set text to “”&IAP.ProductPrice(“supportdev1”), and the On purchase success and the Has product “supportdev1” do not work.

I have created text objects to monitor what is happening during game play on the phone and these events are never triggered, however I can purchase the product and the On store listing success is working.

However, due to the triggers not working the ads are never removed. I have been stuck for 1.5 wks trying to sort this out and I believe I have read all the construct 2 tutorials and forum posts. So any help will be very must appreciated!

You can see my logic below:

On start of layout >> IAP > Add product IDs “supportdev1”
>>IAP > Request store listing

IAP > On store listing success >> Restore purchases
>IAP > Has Product “supportdev1” >> System > Set IAP_Made to 1
>> LocalStoreage > Set item “IAP_Made_Key” to IAP_Made

IAP > On store listing success >> SupportDev1_Text > Set text to “”&IAP.ProductPice(“supportdev1”)
>> Store_Available_Indicator_Text > Set Text to “Is Store Available: “&Display_IAP_Prices
>> System > Set Display_IAP_Prices to “Yes”

System > Display_IAP_Prices = “No” >> SupportDev1_Text > Set text to “…”

Touch > On tap gesture on button >>
> IAP > Is store available >> IAP > Request store listing
>> IAP > Purchase product “supportdev1”
>> Purchase_Made_Indicator_Text > Set text to “IAP Made: “&IAP_Made

On product “supportdev1” purchase success >> IAP > Restore purchases
>> System > Set IAP_Made to 1
>> LocalStorage > Get item “IAP_Made_Key”
>> Purchase_Success_Indicator_Text > Set text to “Purchase Success”

LocalStorage > On item “IAP_Made_Key” get >> LocalStorage > Set item ”IAP_Made_Key” to IAP_Made

--------------------------------------------------------------------

To see this all working in action checkout my game:

https://play.google.com/store/apps/deta ... ubbaPoppin
Last edited by Seridian on Sun Jan 03, 2016 11:10 pm, edited 1 time in total.
B
8
S
2
Posts: 7
Reputation: 525

Post » Mon Nov 30, 2015 10:16 pm

*moved to a more appropriate location
If your vision so exceeds your ability, then look to something closer.
Moderator
B
136
S
31
G
86
Posts: 5,482
Reputation: 59,750

Post » Tue Dec 01, 2015 10:09 am

Use release r218 and follow this tutorial. R218 contains a fix to the IAP C2 plugin.
I'm still to update to the IAP part of the tutorial, but the cordova plugin to use for payments is : cc.fovea.cordova.purchase or https://github.com/poiuytrez/AndroidInAppBilling (as per my tests, both work)
Be sure also to use the admob cordova plugin indicated in the tutorial.

Prices and names still don't work currently (Ashley is looking into it) but "Has product" now triggers as expected.

You don't need to request the store listing when doing a purchase since you already did it once on start of your application.
So far I haven't used "Restore purchases" only used "Has product" and if it hasn't, then I'm displaying ads, otherwise, I'm hiding them, simple as that.

Keep an eye on the tutorial I should update it quite soon and Ashley should make new versions of the IAP plugin as well.
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
293
S
117
G
96
Posts: 7,310
Reputation: 71,069

Post » Tue Dec 01, 2015 6:42 pm

Hey Kyatric,

Thanks for the info, I'll take a look and report back :)
B
8
S
2
Posts: 7
Reputation: 525

Post » Thu Dec 03, 2015 11:15 pm

Update.

My IAP are now working fine, I only needed to replace the "On purchase success" event with the "Has product" event and now it works. All of my other settings remain the same.

I hope this post helps others, good luck guys and thank you for the help Kyatric :)
B
8
S
2
Posts: 7
Reputation: 525

Post » Fri Dec 04, 2015 8:41 am

Moreover I've updated the tutorial I was talking about.
It now contains a detailed part about IAPs.
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
293
S
117
G
96
Posts: 7,310
Reputation: 71,069

Post » Fri Dec 04, 2015 3:55 pm

Kyatric wrote:Moreover I've updated the tutorial I was talking about.
It now contains a detailed part about IAPs.

You sir are a hero. :D
B
30
S
8
Posts: 5
Reputation: 1,798

Post » Fri Dec 04, 2015 8:15 pm

@Kyatric

What exactly is and isn't working in the IAP. This may be directly related to issues I'm having?
B
15
S
6
Posts: 124
Reputation: 1,737

Post » Sat Dec 05, 2015 12:21 pm

As far as I know ProductPrice and ProductName does not return values currently.
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
293
S
117
G
96
Posts: 7,310
Reputation: 71,069

Post » Sun Dec 06, 2015 7:49 pm

Thanks @Kyatric, so does this mean that Has.Product "" doesn't respond properly? That's the issue I'm having. The user can purchase but when it checks for Has.Product it comes back false.
B
15
S
6
Posts: 124
Reputation: 1,737

Next

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 2 guests