Most of our purchases keep getting canceled after 3 days 30 minutes exactly, which I presume is the result of pending purchase state. However, there is so little documentation about how to handle pending purchases exactly. And, for some reason, even though I am a tester myself, I cannot test it because there is no "Slow card" option on purchase methods. Also, we do not have a backend server to well, back us up.
This is the explanation I've found from the official documentation:
void handlePurchase(Purchase purchase) {
if (purchase.getPurchaseState() == PurchaseState.PURCHASED) {
// Acknowledge purchase and grant the item to the user
} else if (purchase.getPurchaseState() == PurchaseState.PENDING) {
// Here you can confirm to the user that they've started the pending
// purchase, and to complete it, they should follow instructions that
// are given to them. You can also choose to remind the user in the
// future to complete the purchase if you detect that it is still
// pending.
}
}
Look at the explanation on the PENDING state. What does "To complete the purchase, they should follow instructions that are given to them" mean? What are these instructions exactly? Do we need to redirect the user to Google Play or what? It is not specific about what to do and is bugging me out because purchases are getting cancelled for no reason, or for this reason. How does one complete a pending purchase? There is nothing about it, or I cannot find it, hence I ended up here.
I hope you can help me figure this out. Thanks.
Online Assistance and Customer Care. To view your Google Play balance, visit https://play.google.com/store/account. To speak to customer care, call us at 1-855-466-4438.
Google may help you get a refund for an in-app purchase, but you must submit a refund request through this Google form. Make sure that you're signed in to your Google account, visit the link, and fill out the form. You'll need to select which in-app purchase you'd like a refund for and select a reason for your request.
I agree the documentation is poor, especially since the one time you want to know exactly what's happening is when you're handling other people's money!
It looks like a 'slow card' transaction is actually a 'pending purchase', something Google have been rolling out in 2019. Here's the probable flow...
As for handling unpredictably timed update events, we have an app with a handlePurchaseUpdated
method listening out from the moment the app starts, and makes changes based on the Purchase
object that comes with it. Here's an example flow:
Purchase
object has purchase state PENDINGNote: Ours is a ReactNative app, not native java, but the flow should be the same.
It's complicated to implement because you have to pick your time to make your purchase changes and display the purchase result at a time that makes sense, not necessarily when the purchase update arrives 5 secs after startup (or any other weird time). And it gets more complicated if there are errors during your grant-entitlement or acknowledgement steps, urgh.
Also, you might not be seeing the 'slow card' tester option because you didn't allow it?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With