#Exception during RestorePurchases() for deleted IAP

1 messages · Page 1 of 1 (latest)

normal berry
#

I'm running into a problem where BillingServices is throwing exceptions during RestorePurchases() after I deleted a test IAP product from the Google Play Console that testers had "bought". It throws an error inside FinishTransactions in the native code. I've been able to work around this by modifying FinishTransactions like so, by adding a couple of null checks to not add null products to the finishableTransactions array:

                {
                    if (item == null || item.Product == null) return false;
                    var transactionState = item.TransactionState;
                    return !(transactionState == BillingTransactionState.Purchasing ||
                             transactionState == BillingTransactionState.Deferred);
                });

But I still see errors being thrown in the logcat from native code:

I am currently trying to figure out why Billing Services is returning 0 products on store init after adding a new IAP product, and while I don't think it's related, I'm trying to eliminate any possible problems.

tepid sapphire
#

By delete you mean, you deleted a IAP product from play console?
If so, if you have purchases related to it earlier, when we fetch the purchased transactions and try to match the BillingProducts list, if that product is not added in our Billing Services settings, it can't find that product throwing the exception you see.

To overcome this, you can just add the product in the billing services products and mark it as inactive.

normal berry
#

Yes, I deleted the IAP product from the play console. But some of the test devices had purchased it, and now those throw an error on launch.

Re-adding the product in the Billing Services settings and setting it to Inactive does fix some of those errors now. I do still see it print BillingServices Unexpected product identified : <deleted iap product id> but the store does initialize properly and works now. Thanks.

tepid sapphire