Open RedHunter7 opened 1 year ago
I'm not able to reproduce this when testing with the recent extension update to Google Play Billing Version 5
User has tested on Samsung A32 (Android 12) & Google Pixel 4 (Android 11)
We also see this. Slightly different output. This is on a Xiaomi-MI 9, Android 10.
ERROR:IAPEXT: IAP error 5
DEBUG:SCRIPT: IAP Error
DEBUG:SCRIPT: {
error = "failed to buy product",
reason = 0
}
I suspect that the default auto-completion option assumes a sequence & timing of events that is incompatible with that caused by the slow test card option (and presumably, the real-life equivalent situation)
We also see this. Slightly different output. This is on a Xiaomi-MI 9, Android 10.
ERROR:IAPEXT: IAP error 5 DEBUG:SCRIPT: IAP Error DEBUG:SCRIPT: { error = "failed to buy product", reason = 0 }
How are you testing this? Last time I tried I failed to repro the issue.
To reproduce:
7. Observe the error in logcat.
I tried reproducing this issue using the instructions above but to no avail. Here's me being it:
11-07 23:56:29.979 24424 24424 D IapGooglePlay: billingResponseCodeToDefoldResponse: 0 defoldResponse: 0
11-07 23:56:29.979 24424 24424 D IapGooglePlay: convertPurchase() original json: {"orderId":"GPA.3381-8816-4353-20615","packageName":"com.defold.extension.iap","productId":"com.defold.iap.goldbar.small","purchaseTime":1699397788166,"purchaseState":4,"purchaseToken":"hbalapelmcaccckkiidohkpo.AO-J1OyCmHpgSbma5UVLk27munHw8ERPvjoSwxMs99-S_wpCSs1sQnTBR6rdXud8hUIPCt5z3-owy6WHtyrff66Yac8GK30NdlBW1R3KWYIewMj5nrktvSQ","quantity":1,"acknowledged":false}
And one minute later when the transaction goes though I get this:;
11-07 23:57:30.825 24424 24424 D IapGooglePlay: billingResponseCodeToDefoldResponse: 0 defoldResponse: 0
11-07 23:57:30.825 24424 24424 D IapGooglePlay: convertPurchase() original json: {"orderId":"GPA.3381-8816-4353-20615","packageName":"com.defold.extension.iap","productId":"com.defold.iap.goldbar.small","purchaseTime":1699397788166,"purchaseState":0,"purchaseToken":"hbalapelmcaccckkiidohkpo.AO-J1OyCmHpgSbma5UVLk27munHw8ERPvjoSwxMs99-S_wpCSs1sQnTBR6rdXud8hUIPCt5z3-owy6WHtyrff66Yac8GK30NdlBW1R3KWYIewMj5nrktvSQ","quantity":1,"acknowledged":false}
I do not see any erros or warnings in logcat during this process. Anything in particular l should look out for?
Bug Description https://forum.defold.com/t/issue-when-purchase-testing-android-iap-product-using-slow-test-card-method/71474
When using "Slow test card, approves after few minutes" method on purchase testing, the transaction state become
error
with reasoniap.REASON_UNSPECIFIED
. After 3-5 minutes, transaction state becomeiap.TRANS_STATE_PURCHASED
.Same with "Slow test card, declines after few minutes", the transaction state also become
error
with reasoniap.REASON_UNSPECIFIED
. But after 3-5 minutes, the API does not give any information if transaction is fail/error.Expected behaviour
PENDING
. After few minutes, transaction state becomesPURCHASED
PENDING
. After few minutes, transaction state becomesFAILED
orerror