Setup IAP for purchase button.

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By THE HELIX

I setup the iap in godot by modules. When i press buy button google tester account opens and i purchase the coin. The coin is added to coin collected. When i again press buy button Google tester account opens and i cancel the purchase but also coin is added even after cancelling. How to set it up such that coin is added only after purchase is success?

:bust_in_silhouette: Reply From: flurick

Does the code check the return of the call to the store or does it just assume that it succeeded? Found a demo project here