Closed sandoche closed 5 years ago
I tried in another device and everytime I click on trigger the action it asks me to pay.
And triggering purchase.restorePurchases()
do not do anything I don't see the purchase already done :/
But I can see them in the developper console of Google Play.
So one of the phone the purchase.restorePurchases()
triggers the right event but the purchase.buyProduct()
triggered only once the first time and never again.
And in the other phone it's the other way around. So I am a bit confused. There are both on Android 8.0. One is a Xiaomi mi5s and the other a galaxy S7.
Hey @sandoche , I'm not sure how purchases should work in your app, but I do not think how purchases work in general. So couple of points that should point you in the right direction:
restorePurchases
. Such purchases should be used when the user can buy multiple times of an item in your app. restorePurcahses
I suggest you read in details all the possible purchases on both platforms as they differ quite a bit and you decide which one will fit you best for the in-app products you offer in your app. Only then to start implementing your purchase workflow and testing with your actual products, because you might end up messing your test GoogleID.
THanks a lot that was the problem !
Hello,
I am on Android.
The first time I ran it triggered the payement and I didn't consume it (I added the consume function later). And now everytime I execute the
purchase.buyProduct
it goes to the else with theconsole.log(transaction)
. Also I don't know how to reset it, how to remove the purchase from the phone. I removed it from the Play Store only.The last console.log is triggered and here is the result:
I am a bit stuck what can I do? How can I go back to the "buy" window? How do I reset the previous purchase?