[Unity] purchaseSuccessfulEvent( AmazonReceipt ) sometimes returns twice
We found that AmazonIAPManager.purchaseSuccessfulEvent(AmazonReceipt receipt) can sometimes call us back twice. So we end up giving 2 new items to the user. We have looked into the AmazonReceipt.token but it seems the token is the same for the same item, thus it is not able to distinguish the 2 transactions. The only workaround we can think of is to impose a time interval, so if it comes back twice within a seconds then we ignore the second one. But this is a very bad solution. How can we do? Thanks.
I am sure the button is being clicked once, since I have put a breakpoint in the button and it is triggered only once. But the purchaseSuccessfulEvent( AmazonReceipt ) can still come back twice sometimes.