question

Kim Strasser avatar image
Kim Strasser asked

How can I find out if receipt validation was executed successfully after a player purchased an in-app product?

I call client API ValidateIOSReceipt/ValidateGooglePlayPurchase after the player purchased coins(consumable product) or a new level pack(non-consumable product) with real money in my game. I have created the in-app products in the Apple App Store/Google Play Store and the products in my title's catalog.

What happens if the player buys an in-app product and if client API ValidateIOSReceipt/ValidateGooglePlayPurchase is not executed successfully (for example because the network connection failed)? Is it possible that the player can get his purchased product in this case if I don't call ValidateIOSReceipt/ValidateGooglePlayPurchase immediately again after it failed?

Is it possible to find out if every real money purchase in my game was added to the player's PlayFab account? For example, if a player would contact me and tell me that he didn't got his purchased product in my game. What could I do to find out if the player tells the truth?

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

·
Sarah Zhang avatar image
Sarah Zhang answered

>> What happens if the player buys an in-app product and if client API ValidateIOSReceipt/ValidateGooglePlayPurchase is not executed successfully (for example because the network connection failed)? Is it possible that the player can get his purchased product in this case if I don't call ValidateIOSReceipt/ValidateGooglePlayPurchase immediately again after it failed?

Basically, if the API is not executed successfully, the purchase will not be completed. To determine if the API ValidateIOSReceipt/ValidateGooglePlayPurchase is executed successfully. You can check if the event “player_receipt_validation” is generated. For example, you can consider using this event to trigger a Rule to write a flag in players’ read-only data to determine whether the previous validation is successful.

Besides, please note that there is a known issue about the API ValidateGooglePlayPurchase now. Our purchases validation method may validate the pending transactions of Google Play. You can check the answer of this thread - https://community.playfab.com/questions/55990/playfab-accepting-pending-purchases.html for more information.

For summary, to prevent the API to validate the pending transactions, the current workaround is to check the purchase state of Google Play on clients and only call the ValidateGooglePlayPurchase API when the state is “purchased”.

>> Is it possible to find out if every real money purchase in my game was added to the player's PlayFab account? For example, if a player would contact me and tell me that he didn't got his purchased product in my game. What could I do to find out if the player tells the truth?

If the receipt is validated successfully, the corresponding item will be granted to players in the backend. If a player said he paid the money but didn’t get the item. You can ask him to issue a valid payment record, then check whether you have the corresponding receipt records on Google Play.

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.

Kim Strasser avatar image Kim Strasser commented ·

What happens if the purchase state of an Apple/Google transaction is "purchased" in the client and if I wouldn't call client API ValidateIOSReceipt/ValidateGooglePlayPurchase?

Would the player automatically get a refund from Apple/Google after a while because he didn't received the product in his PlayFab account or does Apple/Google not know that I didn't credit the product to the player's PlayFab account?

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.