I am currently using the Unity SDK and am trying to validate an iOS purchase receipt. I have set the client catalog to one called iOS_Catalog and the CatalogVersion in ValidateIOSReceiptRequest to the same value. However when making a purchase on iOS I always receive the same error on client:
ERROR /Client/ValidateIOSReceipt: There is no item in the catalog with an ID matching the product ID in the receipt PlayFab.Internal.PlayFabUnityHttp:OnResponse(String, CallRequestContainer)
On the backend the transaction is recorded as successful and the user granted the virtual currency, which I can see in both the purchases section and the playStream.
I presume this error is triggered because the purchased product ID is not found in the main catalog. However I have verified the purchase id is valid and is correct on the Apple App Store and in our iOS_Catalog.
Why then is the option given to use a different catalog for Purchase Validation if it not used by PlayFab on the backend, or I am just doing something wrong?
This is the sample code we are using for the receipt validation:
//Create Request var request = new ValidateIOSReceiptRequest { //Set the catalog version CatalogVersion = "iOS_Catalog", // Pass in currency code in ISO format CurrencyCode = args.purchasedProduct.metadata.isoCurrencyCode, // Convert and set Purchase price PurchasePrice = (int)(args.purchasedProduct.metadata.localizedPrice * 100), // Pass in the receipt ReceiptData = appleReceipt.Payload };
Regards,
Neil