Done setting up IAP Phonegap, but IAP is not working???

Get help using Construct 2

Post » Fri Jan 23, 2015 10:29 pm

ddaan9 wrote:
Reinarte wrote:Hello friend,
I would like to try to help you.
you are using the plugin Phonegap IAP 2.0.31? Construct 2 and the R195?
before compiling the project in Intel XDK onserve what is written in the file

intelxdk.config.additions.xml

if that party is present can be to solve in the next compilation

<intelxdk: pluginintelxdk:name="https://github.com/cranberrygame/com.cranberrygame.phonegap.plugin.iap#4306f62a0d9683eca8d8be135533dd92f6a446c1"intelxdk:value="https://github.com/cranberrygame/com.cranberrygame.phonegap.plugin.iap#4306f62a0d9683eca8d8be135533dd92f6a446c1" />
<intelxdk: intelxdk plugin: name = "org.apache.cordova.inappbrowser" intelxdk: value = "org.apache.cordova.inappbrowser" />


aki are 2 lines only.
Errado?


Thank you for your help.
I do use Phonegap IAP 2.0.31 and Construct 2 R195. I removed the extra subevents like you said in your other post. When i check the files, i can see intelxdk.config.additions.xml.

Since I'm not a coder i have no clue where i should put:

<intelxdk: pluginintelxdk:name="https://github.com/cranberrygame/com.cranberrygame.phonegap.plugin.iap#4306f62a0d9683eca8d8be135533dd92f6a446c1"intelxdk:value="https://github.com/cranberrygame/com.cranberrygame.phonegap.plugin.iap#4306f62a0d9683eca8d8be135533dd92f6a446c1" />
<intelxdk: intelxdk plugin: name = "org.apache.cordova.inappbrowser" intelxdk: value = "org.apache.cordova.inappbrowser" />

Can you guide me? Really appreciate you taking the time to help me!!!!!

PS: I do minify the script when exporting, is that ok?


Hello friend,
my file "intelxdk.config.additions.xml" is so.

<intelxdk: pluginintelxdk:name="https://github.com/cranberrygame/com.cranberrygame.phonegap.plugin.iap#4306f62a0d9683eca8d8be135533dd92f6a446c1"intelxdk:value="https://github.com/cranberrygame/com.cranberrygame.phonegap.plugin.iap#4306f62a0d9683eca8d8be135533dd92f6a446c1" />

<intelxdk: intelxdk plugin: name = "org.apache.cordova.inappbrowser" intelxdk: value = "org.apache.cordova.inappbrowser" />


but in your project in the construct 2 PhonegapIAP plugin must be configured with your key to shopping at GooglePlay
B
27
S
7
G
1
Posts: 76
Reputation: 2,224

Post » Fri Jan 23, 2015 10:31 pm

<intelxdk:plugin intelxdk:name="https://github.com/cranberrygame/com.cranberrygame.phonegap.plugin.iap#4306f62a0d9683eca8d8be135533dd92f6a446c1" intelxdk:value="https://github.com/cranberrygame/com.cranberrygame.phonegap.plugin.iap#4306f62a0d9683eca8d8be135533dd92f6a446c1" />
<intelxdk:plugin intelxdk:name="org.apache.cordova.inappbrowser" intelxdk:value="org.apache.cordova.inappbrowser" />
B
27
S
7
G
1
Posts: 76
Reputation: 2,224

Post » Fri Jan 23, 2015 10:37 pm

@ddaan9: did u solve the issue? I have the same and I still haven't figured out what causes it.
Current Mission: improve design skills
B
8
S
1
Posts: 57
Reputation: 1,003

Post » Fri Jan 23, 2015 10:46 pm

@Reinarte: I have exactly the same issue as ddaan9. However, I don't have the file "intelxdk.config.additions.xml". I exported using Cordova and imported it into Intel XDK. I have the Phonegap IAP 2.0.32 plugin and C2 R195.

I hope you have a quick hint where I have to look to solve the issue.

Cheers
Sophia
Current Mission: improve design skills
B
8
S
1
Posts: 57
Reputation: 1,003

Post » Sat Jan 24, 2015 9:24 am

Hi
I've made a tutorial for that ;)
http://shatter-box.com/knowledgebase/phonegap-iap/

There are two ways to import your games into Intel XDK.
http://shatter-box.com/knowledgebase/ho ... crosswalk/

For both methods you need to update the '...additional.xml' (shown in the tutoiral for IAP under 'Show how to add the plugin manually')
For some reasons C2 adds a wrong code (not for IAP, but for Game and Facebook) to this file. So always check the xml code.
Image Image iTunes: Match3 | Google Play: Match3
B
98
S
33
G
30
Posts: 1,117
Reputation: 27,781

Post » Sat Jan 24, 2015 10:33 am

Cybersurfer5000 wrote:@Reinarte: I have exactly the same issue as ddaan9. However, I don't have the file "intelxdk.config.additions.xml". I exported using Cordova and imported it into Intel XDK. I have the Phonegap IAP 2.0.32 plugin and C2 R195.

I hope you have a quick hint where I have to look to solve the issue.

Cheers
Sophia

Hello Sophia,
The file "intelxdk.config.additions.xml" is automatically created the Construct 2 R195 when u open your project in Intel XDK it will appear there next to your project files.

The problem is how the AndreasR said, some lines will give an error at compile time ... The question is,, we have to change the lines that generate the error in the compilation by ones that will work,,

you have to identify what or which lines are in trouble and replace them.

Since the problem is in the IAP so put this line in place that will work in compiling .....

"<intelxdk:plugin intelxdk:name="https://github.com/cranberrygame/com.cranberrygame.phonegap.plugin.iap#4306f62a0d9683eca8d8be135533dd92f6a446c1" intelxdk:value="https://github.com/cranberrygame/com.cranberrygame.phonegap.plugin.iap#4306f62a0d9683eca8d8be135533dd92f6a446c1" />"

"<intelxdk: intelxdk plugin: name =" org.apache.cordova.inappbrowser "intelxdk: value =" org.apache.cordova.inappbrowser "/>"

here are two lines replace them without the quotes.
B
27
S
7
G
1
Posts: 76
Reputation: 2,224

Post » Sun Jan 25, 2015 4:21 pm

Thank you for you help. I try it... lets see....
Current Mission: improve design skills
B
8
S
1
Posts: 57
Reputation: 1,003

Post » Mon Jan 26, 2015 12:42 pm

Got it working!.....The only thing I needed to do was unchecking minify script when exporting. Thanks for all the help guys.

Also as Reinarte pointed out earlier, in your events you don't need to check for 'has product' or anything, just make an event when touched...-> purchase product.
B
7
S
2
G
1
Posts: 77
Reputation: 727

Post » Mon Jan 26, 2015 2:24 pm

Congrats!!!
Current Mission: improve design skills
B
8
S
1
Posts: 57
Reputation: 1,003

Post » Mon Jan 26, 2015 2:39 pm

I was able to get the In-App Purchase working. However, the purchase is not remember. When the App is closed and re-opened, the user does not have the In-App Product any more. Trying to buy it a second time results in an "Alert" message via the browser object I set up (browser>Alert>Purchase failed).

I went through all the tuts, read and reread forum posts & the phonegap instructions but can't figure it out. Does anybody spot where I did the mistake? I would appreciate any hint so much :o

Here are screenshots of the Google Console In-App section & C2 of all actions related to the In-App Purchase:

In-app_Products_-_Google_Play_Developer_Console_-_2015-01-26_15.17.04.png

c2_actions0.png

c2_actions.png
You do not have the required permissions to view the files attached to this post.
Current Mission: improve design skills
B
8
S
1
Posts: 57
Reputation: 1,003

PreviousNext

Return to How do I....?

Who is online

Users browsing this forum: guannstar, odiusfly and 24 guests