Receipt is true but ProcessPurchase not called

I am running into an issue with a client on Android.

They have bought a non-consumable which is never processed on reinstall of the app.
I can see that is has a receipt but the ProcessPurchase call is never made.

What can cause this?

Are you able to reproduce? What version of IAP? This would not be expected. Please share the code that you are using in ProcessPurchase and to check the receipt.

@JeffDUnity3D Thanks for your message. I cannot reproduce it myself on our devices, but it is happening with a client.
I am still investigating one option - so it might all be good after all. I should know more at the end of the day

So I followed up with client and I managed to track down the following issue:

The client’s device has backup enabled. When uninstalling and reinstalling the app the purchases are never (re)processed again - I suspect because cache/data was restored on install. I noticed because the client was automatically logged in while they should have been logged out of their account.

After manually clearing -cache & appdata (storage) on their device we were able to trigger the process again and the purchases were properly unlocked on the next time the app started.

It is a bit of an issue tbh. Users need to manually reset their data if they need to trigger this again (with backup enabled) as the RestoreTransactions isnt working on Android either.

Got it. This may help https://answers.unity.com/questions/1643057/can-anyone-help-me-place-androidallowbackupfalse-i.html and https://discussions.unity.com/t/765183 and https://assetstore.unity.com/packages/tools/utilities/autobackup-24721 (I have not personally used the asset)

1 Like

I already tried some of those solutions - hence my arrival and question here.
Might have incorrectly implemented or botched the test so I’ll run it again.

Regardless, it would be great if the RestoreTransactions is working either way.

Thanks for the help and quick reply!

So restore should happen automatically on Android. When it does, the explicit method would not return anything in that session. I’m checking with the team to see if it’s possible to disable the automatic behavior.

Thanks for the update - it would indeed be great if you - as developer - could disable this automatic behaviour.
It is not always ideal to have the Billing API do all that stuff for you automatically.