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

Get help using Construct 2

Post » Mon Jan 26, 2015 2:41 pm

@ddaan9 & @Reinarte It would help me a lot to have you guys give me a line what you think the problem is. THANK YOU!
Current Mission: improve design skills
B
8
S
1
Posts: 57
Reputation: 1,003

Post » Mon Jan 26, 2015 5:26 pm

Cybersurfer5000 wrote: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


Sorry but can't see the problem. I also had no experience with IAP, so I would recommend making a new topic and hope that someone sees the problem.

Good luck!
B
7
S
2
G
1
Posts: 77
Reputation: 727

Post » Mon Jan 26, 2015 8:35 pm

Cybersurfer5000 wrote: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

Hello Cybersurfer5000.
Very calm, stay quiet and let's think about the logic.
In your project when you purchase something is released right?
So when you use the "product has" the same thing should be released also understand?

The purchase failed because you already have it stored.
If you clear the cache you will be able to do it again.

The point is that you have to know how to work the logic to get the result that you expect.

you can be more detailed and have more pictures to be able to help you.
B
27
S
7
G
1
Posts: 76
Reputation: 2,224

Post » Mon Jan 26, 2015 11:23 pm

@Reinarte: Thanks for your prompt response!!!

Here are some details: it is a single, managed, non-consumable in-app product.

To your questions: yes, the product with product ID "xyz" is released when purchased. As far as I understand, the purchase of product "xyz" is stored in the Google Play account of the user.
With the condition 'Has product' "xyz", the app checks on Google Play, if the user has purchased product "xyz". If that is true, an action in the app is triggered.

My logic is: user buys product "xyz" once > Google stores purchase of product "xyz" indefinitely > app recognizes that product "xyz" has been purchased > action triggered
If the user closes app or uninstalls the app and re-installs it later > the app still recognizes that product "xyz" has been purchased in the past > action triggered

I am not sure, where I make an error in the logic. Are you saying, I cannot use the "Has product" condition for non-consumable products? If so, what would be the correct condition?

Thank you in advance, Reinarte!!!

PS: I understand the second issue with the failed purchase on the second attempt. That makes sense to me.
Current Mission: improve design skills
B
8
S
1
Posts: 57
Reputation: 1,003

Post » Tue Jan 27, 2015 4:41 pm

Message: Reinarte is not yet permitted to post plain text URLS (300 rep required). 3 URLS removed. Why?
Cybersurfer5000 wrote:@Reinarte: Thanks for your prompt response!!!

Here are some details: it is a single, managed, non-consumable in-app product.

To your questions: yes, the product with product ID "xyz" is released when purchased. As far as I understand, the purchase of product "xyz" is stored in the Google Play account of the user.
With the condition 'Has product' "xyz", the app checks on Google Play, if the user has purchased product "xyz". If that is true, an action in the app is triggered.

My logic is: user buys product "xyz" once > Google stores purchase of product "xyz" indefinitely > app recognizes that product "xyz" has been purchased > action triggered
If the user closes app or uninstalls the app and re-installs it later > the app still recognizes that product "xyz" has been purchased in the past > action triggered

I am not sure, where I make an error in the logic. Are you saying, I cannot use the "Has product" condition for non-consumable products? If so, what would be the correct condition?

Thank you in advance, Reinarte!!!

PS: I understand the second issue with the failed purchase on the second attempt. That makes sense to me.

Hello Cybersurfer5000,
I will try to explain the way I understand.

I know what products managed on Google is stored information email the person who made the purchase, but in the last update Billing API V3 In-app there is a problem because the storage is done locally.note at the end "Local Caching"

I believe that's why I could never restore a purchase after reinstalling App.
I already tried 3 different plugins and none managed to restore (CocoonJS, PhonegapIAP and IAP), so I believe it is not possible until someone shows me that it is possible.

I have a game to be launched soon and I use it a extrategia to be able to restore purchases in the app,
when the purchase is made is given also an achievement for the User, so I do the verification of achievement and release the User.

this way works by verifying the achievement.
that's the way I'm doing ....

My game is incomplete in (mode site)
GooglePlay - assure you that if you buy Part 2, you can reinstall the app that do not need to buy part 2 again ...
B
27
S
7
G
1
Posts: 76
Reputation: 2,224

Post » Tue Jan 27, 2015 4:45 pm

Reinarte wrote:
Cybersurfer5000 wrote:@Reinarte: Thanks for your prompt response!!!

Here are some details: it is a single, managed, non-consumable in-app product.

To your questions: yes, the product with product ID "xyz" is released when purchased. As far as I understand, the purchase of product "xyz" is stored in the Google Play account of the user.
With the condition 'Has product' "xyz", the app checks on Google Play, if the user has purchased product "xyz". If that is true, an action in the app is triggered.

My logic is: user buys product "xyz" once > Google stores purchase of product "xyz" indefinitely > app recognizes that product "xyz" has been purchased > action triggered
If the user closes app or uninstalls the app and re-installs it later > the app still recognizes that product "xyz" has been purchased in the past > action triggered

I am not sure, where I make an error in the logic. Are you saying, I cannot use the "Has product" condition for non-consumable products? If so, what would be the correct condition?

Thank you in advance, Reinarte!!!

PS: I understand the second issue with the failed purchase on the second attempt. That makes sense to me.

Hello Cybersurfer5000,
I will try to explain the way I understand.

I know what products managed on Google is stored information email the person who made the purchase, but in the last update Billing API V3 In-app there is a problem because the storage is done locally.note at the end "Local Caching"

I believe that's why I could never restore a purchase after reinstalling App.
I already tried 3 different plugins and none managed to restore (CocoonJS, PhonegapIAP and IAP), so I believe it is not possible until someone shows me that it is possible.

I have a game to be launched soon and I use it a extrategia to be able to restore purchases in the app,
when the purchase is made is given also an achievement for the User, so I do the verification of achievement and release the User.

this way works by verifying the achievement.
that's the way I'm doing ....

My game is incomplete in (mode site)
GooglePlay - assure you that if you buy Part 2, you can reinstall the app that do not need to buy part 2 again ...

my urls were removed, I need 300 reputation.

developer. android.com/google/play / billing / api. html # managed

reinarte. with. br

play.google. com / store / apps / details? id = com.reinarte.stroke
B
27
S
7
G
1
Posts: 76
Reputation: 2,224

Post » Tue Jan 27, 2015 5:19 pm

@Reinarte. I like your game "Stroke". Really solid and fun!

That strategy with the achievement sounds interesting.

What is the condition and action you use in C2?
Do you use the Phonegap IAP plugin?
How do you set it up in Google Play Developer Console?

Thanks in advance! Sophia
Current Mission: improve design skills
B
8
S
1
Posts: 57
Reputation: 1,003

Post » Tue Jan 27, 2015 6:36 pm

Cybersurfer5000 wrote:@Reinarte. I like your game "Stroke". Really solid and fun!

That strategy with the achievement sounds interesting.

What is the condition and action you use in C2?
Do you use the Phonegap IAP plugin?
How do you set it up in Google Play Developer Console?

Thanks in advance! Sophia

Thank you Sophia.
Thanks for the 5 stars in googleplay
The site version is a small sample, it is still small in relation to the project development.
What is your version of Android?

Soon I will update the site with new modifications, wait ....
B
27
S
7
G
1
Posts: 76
Reputation: 2,224

Post » Tue Jan 27, 2015 10:28 pm

I have Android 4.1.1.

Could you tell me more about the "achievement", @Reinarte?
Maybe that is a way for me to solve my problem with the IAP plugin.
What is the condition and action you use in C2?
Do you use the Phonegap IAP plugin?
How do you set it up in Google Play Developer Console?
Current Mission: improve design skills
B
8
S
1
Posts: 57
Reputation: 1,003

Post » Tue Jan 27, 2015 11:36 pm

Cybersurfer5000 wrote:I have Android 4.1.1.

Could you tell me more about the "achievement", @Reinarte?
Maybe that is a way for me to solve my problem with the IAP plugin.
What is the condition and action you use in C2?
Do you use the Phonegap IAP plugin?
How do you set it up in Google Play Developer Console?

I use Phonegap IAP, PhonegapGame and GooglePlay

It took me a lot to stay as I would like, but it is not as I would like.

In my game need to log two times, one for GooglePlay (web mode) and one for PhonegapGame (Android mode)

I need this because each plugin has the commands I need and can not do everything with PhonegapGame yet,,, it does not have the command to verify that an achievement is unlocked,,,, GooglePlay does the checking,

at the time the purchase is carried out also earn an achievement, so every time the person logging into the game it checks whether the User has the achievement.
I Will not try to restore purchases because I never saw it work after reinstall the game.

Google play console has a place for you to configure a web client that will work with the GooglePlay

but first you need to create a game on google play console, go following the steps carefully, you're not required to do anything just make the necessary achievements, no need to do missions, events, leaderboard,

if you get the pups google achievements will give you a key to be unlocked in your app,,,,,,
the PhonegapGame or GooglePlay plugin has the command unlock the achievement,

once unlocked the User to have whenever you login and you have the googleplay "request list of all achievements."
B
27
S
7
G
1
Posts: 76
Reputation: 2,224

PreviousNext

Return to How do I....?

Who is online

Users browsing this forum: tdcostas and 7 guests