question

genomenjoy avatar image
genomenjoy asked

ValidateGooglePlayPurchase could be accessible to Server API?

ValidateGooglePlayPurchase is a request method available to be accessed for client API; could be also accessible to Server API?

I have added a method on Cloud Script to check that the receipt has a correct format and to check that it is valid and would be great to access to ValidateGooglePlayPurchase through Cloud Script. For now I have returned the response for the client and after I have called ValidateGooglePlayPurchase if the client receives the proper response. Accessing it through Cloud Script would be great to group all validation that the developer want to do for the receipt in a single customized method.

Thanks.

apis
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

·
brendan avatar image
brendan answered

Our receipt validation calls actually already do that - we check that the receipt is specific to your title, that it's valid, that it's for an item in your Catalog, and that it has never been used before. If all that checks out, we create an instance of the item in question and add it to the player inventory. The intent is to have the end-to-end process live in our service, so that there's no opportunity for a hacked client to cheat and get things it didn't pay for. If that doesn't account for everything you'd like to do in Cloud Script, can you describe the scenario you have in mind and what other functionality you're enabling in the script?

4 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.

genomenjoy avatar image genomenjoy commented ·

Ok, the problem is that for Google receipts I also check developerPayload (that I have included before in the receipt) and the format of the orderId (GPA. xxxx-xxxx-xxxx-xxxxx for production receipts and the same of transaction Id for test receipts) previously to use ValidateGooglePlayPurchase. I only ask it to include them before and use one single Cloud Script method including also the ValidateGooglePlayPurchase call with Server API.

0 Likes 0 ·
brendan avatar image brendan genomenjoy commented ·

Sorry, I'm still not clear on what functionality this would provide on top of what the receipt validation call already does. We do process both sandbox and production receipts for Google Play, and we validate the values in question.

0 Likes 0 ·
genomenjoy avatar image genomenjoy brendan commented ·

For now, PlayFab can't check developerPayload inside the receipts and it should be checked by each developer (that has to create each one before start the purchase to include it on the Google purchase, and after check the receipt on server). I have only said that it would be great that ValidateGooglePlayPurchase also includes a Server API call to do one call to server, instead of two, to check all the developers would want for checking receipts.

0 Likes 0 ·
Show more comments

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.