Here is a critical bug with latest sdkboxIAP plugin (18.104.22.168) on android with consumable items (virtual currency)!
I use sdkbox with
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::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
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.