Good morning,
I use UnityIAP to implement IAP and PlayFab to validate receipts. At the moment we only have CONSUMABLE items and we are testing on iOS. Both Sandbox and Production environment worked fine, so the whole system seemed pretty reliable, but recently we stumbled upon a problem:
For some reason, a perfectly valid receipt from the Apple store failed to validate. The error returned by PlayFabClientAPI.ValidateIOSReceipt was:
"PaymentType": "ReceiptValidation",
"Error": "A third-party downstream provider returned an error to the PlayFab service",
"Valid": false
Internally this would keep the transaction in the Pending state, as suggested, until PayFab returns that the validation did succeed: https://docs.unity3d.com/Manual/UnityIAPProcessingPurchases.html
The problem is that when this call fails and the app is restarted, so that UnityIAP performs another attempt automatically, the receipt returned by the Apple Store is the same as before, I guess. So when I try again to validate it, this time I get ReceiptAlreadyUsed
At this point I am stuck, as it looks like the IAP won't even be validated. If I try to purchase the consumable item again Apple will tell me that it has already been purchased and that it will be restored for free, but that's not the case as I cannot validate it though PlayFab.
I am kind of stuck and I don't really know what was the initial problem or how to break this loop.
thanks in advance for your help!