Question on C2 - IAP plugin

Discussion and feedback on Construct 2

Post » Tue Feb 17, 2015 11:00 am

I am trying to use the C2 - IAP plugin for the first time and have a question.

After I use the IAP action "Restore Purchase" on Restore button clicked, and lets say if restore was successful, then which of the following will detect the restore success state ?

- On store listing success/Has ProductID events ?

OR

- On productID purchase success event ?

I am taking care of the first time purchase etc., in the events/actions...Do I need to do anything else specifically for "Restore Purchase" other than just calling "Restore Purchase" IAP action when restore button is clicked?

Thanks!
B
84
S
20
G
3
Posts: 337
Reputation: 7,368

Post » Thu Feb 19, 2015 9:36 am

@Ashley,

Could you tell me if IAP plugin works when I export it using cordova, use Cordova CLi on Mac to create project and prepare it for Xcode and run the Xcodeproject ? My app works fine but IAP doesnt work!

Or Does IAPwork plugin work only with IntelXDK Crosswalk ? I think this is the case...Am I right? If so, can we make it compatible to work on the first method as well?

I have done enough experimentation and research trying to use the method of - export Cordova project, using Cordova CLI / to Prepare for iOS / then opening the Xcode project to test run the app on my device using sandbox account - is not working with C2 IAP plugin.

Could you please let me know.

Edit - I did a build using IntelXDK-Crosswalk for iOS and it works. Can you please make the C2 - IAP plugin to work with plain Cordova CLI / Xcode as well? Or atleast suggest how that can be done? I believe Cordova CLI/Prepare for iOS/Xcode project is pretty much the standard route to publish all iOS apps (w/o having to undergo the pain of using IntelXDK - back and forth between mac/desktop uploading /downloading certs/prov files/ipa's etc., etc.,). I didn't understand why C2 official IAP plugin should be biased to work only on IntelXDK while other C2 functionality and C2 official plugins work fine using just Cordova build?
B
84
S
20
G
3
Posts: 337
Reputation: 7,368


Post » Tue Mar 17, 2015 3:37 pm

Hey, could you please tell us how you did it, Im experiencing the same problems you described in some of your post:

This are the issues I got even when I run it locally with test mode set to yes.

- Purchase doesnt works
- I dont even get the purchaseFail triggered.
- Is store available always returns FALSE
- Get store listing doesnt work, It never calls on store listing received or failed.

Did you manage to get it working on a Cordova build or you used Intel XDK?

Please help us here, this has been an obscure topic for a while.
Image
B
15
S
4
G
4
Posts: 134
Reputation: 3,177


Post » Wed Mar 18, 2015 6:30 am

Up to now, I have the exact same problems as hazneliel. AndI've been struggling with this problem for the last 2 months and still no solution.
I just tried a new cranberrygame IAP plugin / XDK export, and as hazneliel describes, I got "store listing failed" everytime in Sandbox environment.

The next thing to try is follow this tutorial :
https://www.scirra.com/tutorials/1353/h ... lkphonegap
Which seems quite in-depth.
B
21
S
5
G
1
Posts: 317
Reputation: 2,291

Post » Wed Mar 18, 2015 1:39 pm

I also used Cranberrygame's plugin and it works. I had a problem when Failed/Success did not trigger when using the PhonegapGame plugin that broke the intelxdk.config.additions.xml file required by IntelXDK. My problem was that IntelXDK did not put the permission "
Code: Select all
...vending.BILLING
"in the apk generated. (or something similar) When installing on your phone make sure you have that permission showing
B
74
S
19
G
21
Posts: 492
Reputation: 17,277


Return to Construct 2 General

Who is online

Users browsing this forum: Biim, newt and 5 guests