It turned out that the request "restore Transactions" also sends back unmanaged transactions that have not received confirmation that they were received by your product.
Here is a solution that works for both managed and unmanaged products:
- When a user wants to purchase, first set the pref value (for example,
RESTORE_TRANSACTION_NEXT_TIME ) to true , and then send the purchase request to the market. - On your
onBillingSuppored check that the pref is true , and if it fulfilled billingService.restoreTransachtions() - In onPurchaseStateChange (): where
purchaseState == PurchaseState.PURCHASED) set RESTORE_TRANSACTION_NEXT_TIME to false
This will automatically recover the lost transaction.
source share