question

AnthonyKim avatar image
AnthonyKim asked

Receipt Validation return true but payment canceled in goolge play console

I just wonder how can it happen.

I already call ValidateGooglePlayPurchase after I get a receipt from google whenever a user using in-app payment.

I used Playfab for almost 4 years but it is the first time for me.

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.

JayZuo avatar image
JayZuo answered

Thank you for reporting this issue. Currently, PlayFab doesn't check the "purchaseState" in each receipt. Our engineering team has aware of this. As a workaround, please check purchase state in client before calling ValidateGooglePlayPurchase method as Google said: https://developer.android.com/google/play/billing/integrate#pending.

10 |1200

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

Ivan Cai avatar image
Ivan Cai answered

PlayFab calls google API to validate receipt from google, so it's google who returns true. However, the cancellation of the payment is shown on google console. So, this issue seems to be caused by google play, you can ask google support for help.

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.

AnthonyKim avatar image AnthonyKim commented ·

After I checked that user’s player_receipt_validation log.

I can find this “purchaseState: 4" in ReceiptContent.

"purchaseState: 0" means success purchase as I know.

So, I wonder how can this receipt pass validate receipt API.

0 Likes 0 ·
trowju@gmail.com avatar image
trowju@gmail.com answered

I was actually about to post this question, I have seen the exact same issue @Ivan Cai. Can you talk via email? I can show you what's going on.

10 |1200

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

JayZuo avatar image
JayZuo answered

Our engineering team is implementing the server-side check according to Google’s recommendations: https://developer.android.com/google/play/billing/security#verify. As it’s using Google Play Developer API to verify with Google that the purchase is legitimate, we will need you provide the Service account key field in Game Manager.

You can create a service account as following Getting Started | Google Play Developer API | Google Developers. In this process, you can create a private key. The private key is downloaded to your machine and is the only copy of this key. This private key is what we need. Please enter the whole JSON into Service Account Key section. When it is saved successfully, you will only see the private key id in GM.

10 |1200

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

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.