How do I configure the IAP plugin in a cordova project?

Get help using Construct 2

Post » Fri May 26, 2017 6:15 pm

Message: PauloMarcio can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
I'm using newer versions of cordova and c2 to build my game, i'm doing some tests with the IAP plugin but can't get it working, how i build it:

export the project as a cordova app and dismark the options to export to XDK.
so in cordova i do: cordova plugin add cordova-plugin-payment-iap(this is from here: https://github.com/cranberrygame/cordov ... ayment-iap Github)
the plugin is installed and the build runs ok.

Note: i also tried to build without the plugin but the app behaviour was the same.

This is my project:
Code: Select all
on start of layout: add product ID "test_pd" and request store listing
on store listing succes: text "ok"
on store listing failed: text "not ok"
on button clicled: purchase produtct "test_pd"
on any purchase success: text "purchased"

The problem is: no message is being displayed, it should at least try to download the store(i have no idea from where!!??) and show me a "not ok" message, but nothing is happening, i guess the plugin is not working, so can someone please explain me where can i get the right plugin for the IAP in C2 and the right way to configure it?

Thanks for attention.
B
5
S
2
Posts: 8
Reputation: 443

Post » Sat May 27, 2017 3:33 pm

Someone?
B
5
S
2
Posts: 8
Reputation: 443

Post » Sat May 27, 2017 4:49 pm

Ok, i figured out! The problem is that when exporting to cordova only we have to manually configure the plugins we are using(intel XDK do it for us) , because some plugins uses 3rd party dependencies to do their job, this dependencies are listed in the edittime.js file of the plugin, so, for each plugin you use you must install the cordova plugins to make them run, in this cases they are just bridges between c2 and cordova.

After that i finally got an "not ok" message, thanks all for attention and sereously i think that this kind of thing should be made more clear, it would save us a lot of time...

Thanks all for attention.
B
5
S
2
Posts: 8
Reputation: 443


Return to How do I....?

Who is online

Users browsing this forum: Armench and 10 guests