Here is a critical bug with latest sdkboxIAP plugin (2.4.3.3) on android with consumable items (virtual currency)!
I use sdkbox with setAutoFinishTransaction(false)
and enableUserSideVerification(false)
to check transaction validity on my server.
But sometimes I cannot invoke IAP::finishTransaction()
because the application is lost internet connection / application was terminated / device is turned off / etc.
In such case, IAP bills the user for the item (a test purchase confirmation is sent to my e-mail), but the item is not consumed. The currency is not added to user’s account (meaning the onSuccess
listener method is not being called).
When I try to buy the same item again, it fails with error code “7 item already owned”.
The item is explicitly defined as consumable in sdkbox_config.json. Since the item is consumable, using IAP::restore()
neither IAP::requestUpdateTransaction()
does not help, they return nothing.
So there is a huge problem with money disappearing and user just lose his money, and they will claim to support but I can’t check their payments.
So there is must be few functions in SDK like IAP::RestoreUnconsumedTransactions() to receive all unconsumed items ( via
com.android.billingClient.queryPurchases(BillingClient.SkuType.INAPP)
with their productID and purchaseToken
Also we need a function sdkbox::IAP::ConsumeProduct(std::string purchaseToken) that will invoke com.android.billingclient.api.BillingClient.consumeAsync()
to consume this items.