play-billing-samples icon indicating copy to clipboard operation
play-billing-samples copied to clipboard

Missing purchase in successful purchase result

Open Lingviston opened this issue 2 years ago • 2 comments

https://github.com/android/play-billing-samples/blob/047d2eb8eef8fe32ec07a115580faea8eb865e43/ClassyTaxiAppKotlin/app/src/main/java/com/example/billing/gpbl/BillingClientLifecycle.kt#L333

Hi Is the above case "legal"? User has made a purchase, GPBL reports it being successful, but for some reason doesn't provide any "purchase" to process.

In which cases may it happen? How to properly support it?

Lingviston avatar Jan 23 '24 09:01 Lingviston

Have you actually experienced such a condition? I think this might just be an implementation quirk in the sample otherwise, there is no real reason for the if there other than to log the condition I guess. Not worth worrying about unless you are actually experiencing such an issue in prod.

matale avatar Feb 21 '24 08:02 matale

Yes, I've experienced it. It seems to happen during subscription cross grade with Deferred replacement mode. Not every time - just must be in certain state. For example they can have subscription, cancelled during trial period.

Lingviston avatar Feb 21 '24 08:02 Lingviston