question

danilo avatar image
danilo asked

RedeemAppleAppStoreInventoryItemsAsync returns Error: Either V6ReceiptsData or V7ReceiptData must be specified (Parameter 'Receipt')

When I try to validate AppStore purchase I get an error stated in the title. This is how I call it:

public async Task<RedemptionSuccess> ValidatePurchaseAsync(RealMoneyPurchaseResponse purchaseInfo)

{
	var validationRequest = new RedeemAppleAppStoreInventoryItemsRequest
        {
        	Entity = new EntityKey()
                {
                    Id = PlayFabApiManager.Instance.PlayerEntityKey.Id,
                    Type = PlayFabApiManager.Instance.PlayerEntityKey.Type
                },
                Receipt = purchaseInfo.PurchaseReceipt
            };

	var result = await PlayFabApiManager.Instance.GetApi<PlayFabEconomyInstanceAPI>().RedeemAppleAppStoreInventoryItemsAsync(validationRequest);

}


I also tried extracting Payload argumetn from purchaseInfo.PurchaseReceipt but I got the same error. 

What am I doing wrong here?
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

kylemc@microsoft.com avatar image
kylemc@microsoft.com answered

We found an issue on our side that may be impacting AppleAppStore redemption and we'll have a patch out this week.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

kylemc@microsoft.com avatar image
kylemc@microsoft.com answered

`RedeemAppleAppStoreInventoryItems` uses the validation process explained below.

Validating receipts with the App Store | Apple Developer Documentation

Make sure you obtain the receipt in the same way when calling the API.

Out of curiosity, which API are you getting the `RealMoneyPurchaseResponse` from? I couldn't find it anywhere.

1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

danilo avatar image danilo commented ·

Sorry about confusion, that is our abstraction of purchase response so we can decouple domain code from unity specific classes, it is basically the copy of the Unity PurchaseEventArgs with some aditional data.

So the pruchase receipt you see in my example above is the exact copy of the original PurchaseEventArgs.purchasedProduct.receipt. So I'm afraid I can't do anything about obtaining purchase receipt the other way since it is generated by Unity IAP. We are using Unity IAP version 4.5.0, maybe it has to do sometihg with version compatibility?

0 Likes 0 ·
kylemc@microsoft.com avatar image
kylemc@microsoft.com answered

I can take a look on our side too and let you know if I see anything

1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

danilo avatar image danilo commented ·

Any info on this so far?

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.