question

Ozan Yilmaz avatar image
Ozan Yilmaz asked

PlayFab accepting pending payments

Hello everyone,

I have found an interesting player behaviour in our game. A player purchased something via Google Play, their payment is pending at the moment, however, PlayFab accepted the receipt and gave the related item to the player.

This is the order in the Play Console:

Title ID: *****

Player ID: 61618A0EDF287C0C

You can also find the PlayStream event of the receipt validation in the player's data explorer ("player_receipt_validation"). It shows that Acknowled value of the receipt is false. Shouldn't the PlayFab not accept the receipt in this case?

01.jpg (11.5 KiB)
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.

Aidos Ryskeldinov avatar image Aidos Ryskeldinov commented ·

Hi. I have this problem too! Been several times! And also with IDR currency

0 Likes 0 ·
Seth Du avatar image Seth Du ♦ Aidos Ryskeldinov commented ·

May I have your title ID and impacted players' IDs?

0 Likes 0 ·
Ozan Yilmaz avatar image Ozan Yilmaz Seth Du ♦ commented ·

I had the issue with the same currency. Is there a problem with IDR currency? It looks like it's the Google's problem though.

0 Likes 0 ·
robert avatar image robert commented ·

Same issue here, has there been any update for these pending transactions?

0 Likes 0 ·
Seth Du avatar image
Seth Du answered

@Ozan Yilmaz, @Aidos Ryskeldinov. According to the discussion within the team, we believe it may be caused by the new version of Google Play Billing Library -- Android Developers Blog: Meet Google Play Billing Library Version 3 (googleblog.com), especially the new payment method "Pay by cash", Indonesia and Malaysia are the first places that support this feature, and it may be the reason you see IDR in your backend.

For now, the possible solution is to verify the payment state again in your client when the purchase is done by the customer, which is from "e.purchasedProduct.receipt". Then you may call ValidateGooglePlayPurchase to grant items. If you refer to the document, you may notice that ValidateGooglePlayPurchase will be called directly when PurchaseProcessingResult is invoked automatically, without an additional verification. You may call any Google API to verify the state of the payment before ValidateGooglePlayPurchase is called.

Please feel free to send a thread in Feature Request forum -- https://community.playfab.com/spaces/24/index.html

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.

JayZuo avatar image JayZuo ♦ commented ·

Our engineering team is reviewing the receipt validation process and going to re- factorize of the purchase workflow. This will take some time. Before the new purchase workflow is ready, as Seth said, please check the PurchaseState in Client as a workaround. If it is not “PURCHASED”, please do not call ValidateGooglePlayPurchase API.

0 Likes 0 ·
JayZuo avatar image JayZuo ♦ commented ·

Update: Our engineering team is implementing the server-side check according to Google’s recommendations: https://developer.android.com/google/play/billing/security#verify.

When there is more info, I'll update here. Thank you for your continued patience!

0 Likes 0 ·
Seth Du avatar image
Seth Du answered

I have checked your title, but only find one player_receipt_validation event, which have {"Valid": true} in the payload. To be clear, the state data is returned from Google server. I believe you may consult with Google about the state of this purchase.

As long as it is not a reproduceable issue, you may simply revoke the item once you have confirmed that this purchase is not successful.

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.

Ozan Yilmaz avatar image Ozan Yilmaz commented ·

The receipt has been canceled on Google Play Console. How is that Valid value was true for the Pending purchase?

0 Likes 0 ·
Seth Du avatar image Seth Du ♦ Ozan Yilmaz commented ·

This can be caused by a recent update on Google Play purchase process. I will dig into it. Thanks for your understanding.

0 Likes 0 ·
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 see the private key id in GM.

If you've updated Service account key, please let us know.

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.

Ozan Yilmaz avatar image Ozan Yilmaz commented ·

@Jay Zuo So, if I provide the service account key, everything will be solved right? By the way, is the current Google Add-on works without the service account key?

0 Likes 0 ·
JayZuo avatar image JayZuo ♦ Ozan Yilmaz commented ·

Currently, we are still testing on this. Once it's deployed, there should be no need to check the PurchaseState in Client before calling ValidateGooglePlayPurchase API. And, yes, the current Google Add-on works without the service account key unless you are using subscription/membership (beta) feature.

0 Likes 0 ·
Aidos Ryskeldinov avatar image Aidos Ryskeldinov commented ·

Configured as you indicated. But the problem has not been resolved. 618AA and B15DF title id.

0 Likes 0 ·
JayZuo avatar image JayZuo ♦ Aidos Ryskeldinov commented ·

Thanks for the update. I'll check with our engineering team. If there is any update, I'll let you know.

0 Likes 0 ·
Daniel William avatar image
Daniel William answered

This also happening to us, could you please have a check for ours game title 1AF08

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.