I can't really wrap my head around Google's in-app purchases. With Apple everything seems to work fine but here...
First, every time I buy my product id Google sends me several purchases, so instead of buying product just once per click it's buying several products per click. Sometimes 2, sometimes 5, sometimes 1. I used booleans to make sure that the code is read once per click, or at least I thought it worked (see attached image). Since I'm also receiving emails with the confirmation I can see that he is spending the money only once per click.
Second problem. My other product id (I have 3 in total) is always sending me Purchase failed message even though both products are almost identical. And sometimes I can see this popup message "Purchase failed " several times as well. So he is sending me both negative and positive results several times. In the Log view I can see that my print block went several times as well, so code under When a purchase succeeds - product ID has been read several times which should have been impossible! Boolean is turning back only after 0.6 seconds according to my code.
Do you guys have somewhere an example of the code for Consumables and Regular purchases that 100% work?