How can I handle the case of "Slow test card, declines after a few minutes"
See original GitHub issueI am developing an Android app using Android Billing Library.
implementation 'com.android.billingclient:billing:2.1.0'
There are 4 test card options.
- Slow test card, approves after a few minutes
- Test card, always approves
- Test card, always declines
- Slow test card, declines after a few minutes
In the case of 1, “onPurchasesUpdated” callback method was called. So I can handle it.
But in the case of 4, there is no response from the play store library. “onPurchasesUpdated” callback was not called… (I waited more than 5 min…)
How can I handle case 4? I can handle others.
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Why Android BillingClient v2 slow credit card test never ...
It works fine with "Credit card approves after a few minutes", but with "Slow credit card, rejects after a few minutes" the purchase...
Read more >Handling "Slow test card, declines after few minutes" android ...
I have trouble detecting the “Slow test card, declines after a few minutes” case when testing from an Android device.
Read more >Unable to Test Google Play Slow Card Payments - Unity Forum
1. User buys a non-consumable item with "Slow Test Card, declines after a few minutes" option; 2. The app shows a message saying...
Read more >Test your Google Play Billing Library integration
Test a purchase with a declined slow test card. Make a purchase with a delayed form of payment "Slow test card, approves after...
Read more >Use "SLOW TEST CARD" for purchases - MOBILE IAP -
1.Slow test card, approves after a few minutes · 2.Test card, always approves · 3.Test card, always declines · 4.Slow test card, declines...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have the same issue. On launchBillingFlow you get a BillingResponseCode.ITEM_ALREADY_OWNED. the purchase returns PurchaseState.PENDING. If you consumeAsync immediately after its response is BillingResponseCode.DEVELOPER_ERROR, but after a few minutes (or whatever delay the transaction takes to fail) you can consumeAsync again then it returns BillingResponseCode.ITEM_NOT_OWNED, now you are allowed to retry the launchBillingFlow again. not complicated or misleading at all, good job google
@yoonhok524 After the pending transaction is expired, “onPurchasesUpdated” is not called, so you don’t need to handle this case. Just like this transaction never happened, user didn’t pay and developer didn’t grant entitlement.