question

Kim Strasser avatar image
Kim Strasser asked

I have some questions about client API ValidateIOSReceipt/ValidateGooglePlayPurchase

What happens if the player would try to validate the same receipt a second time with client API ValidateIOSReceipt/ValidateGooglePlayPurchase? Which error message will the player get? I don't want that the player uses the same receipt a second time to get an item.

What happens if the player would call client API ValidateIOSReceipt/ValidateGooglePlayPurchase with fake receipt values?

Could a player successfully call client API ValidateIOSReceipt/ValidateGooglePlayPurchase if the in-app product's purchase state is not "Purchased"? I know that there is a bug on Android if the purchase state is "PaymentPending". But what would happen on iOS/Android if the purchase state is not "Purchased" and not "PaymentPending" and when the player would call client API ValidateIOSReceipt/ValidateGooglePlayPurchase for this purchase?

In-Game Economy
10 |1200

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

1 Answer

·
Gosen Gao avatar image
Gosen Gao answered

Every time clients call the ValidateIOSReceipt/ValidateGooglePlayPurchase API, PlayFab backend will communicate with Apple/Google server to check the status of receipt to make sure the API works properly. Besides of pay by cash issue of Google Play, the invalid receipt won’t pass the verification. Feel free to test purchase in sandbox mode and If you get any unexpected result, you may send a thread in the community forum so that we can dig into it.

2 comments
10 |1200

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

Kim Strasser avatar image Kim Strasser commented ·

Is it possible to get the status of the receipt in the result of ValidateIOSReceipt/ValidateGooglePlayPurchase API?

For example: If the status of a receipt would be failed or canceled in the API result, then I wouldn't need to call ValidateIOSReceipt/ValidateGooglePlayPurchase again for the same receipt because I think that it is not possible that the status of a failed or canceled receipt will change to purchased after some time.

0 Likes 0 ·
Gosen Gao avatar image Gosen Gao Kim Strasser commented ·

According to API ValidateGooglePlayPurchase's Document, if the status of Receipt is cancelled, used or invalid, then you will get an Error Code like “ReceiptCancelled”, “ReceiptAlreadyUsed” or “InvalidReceipt”.

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.