Unity Version: 2018.2.0f2
IAP Version: 2.0.3
I’m creating my first android app and trying to have a non consumable purchase to remove adverts.
The purchase works fine, however when the app is restarted it is not restored, if you then try to re purchase it gives the error “Duplicate Transaction”, showing that the purchase has been done.
I’m storing the non consumable purchase locally which is used if the app doesn’t connect to the store, however if the game does connect I want it to use the stores information as this prevents editing of local files, and will revert the purchase correctly if refunded and I believe is they way it should work.
If I clear the IAP Cache with the command UnityPurchasing.ClearTransactionLog(), the purchase restoring works as how i think it should when you launch the game however the documents say this command should be used for testing only and not in a release.
What is the correct way to implement this all the examples I have found including Unity’s own documentation have the problem i described above.