Microsoft Azure PlayFab logo
    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Add-ons
    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA
  • Runs on PlayFab
  • Pricing
    • Blog
    • Forums
    • Contact us
  • Sign up
  • Sign in
  • Ask a question
  • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges
  • Home /
  • API and SDK Questions /
avatar image
Question by Anthony Kim · Mar 23, 2021 at 02:10 AM · In-Game Economy

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.

Comment

People who like this

0 Show 0
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

4 Replies

· Add your reply
  • Sort: 
avatar image
Best Answer

Answer by Jay Zuo · Aug 20, 2021 at 11:11 AM

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.

Comment

People who like this

0 Show 0 · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image

Answer by Ivan Cai · Mar 23, 2021 at 08:48 AM

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.

Comment

People who like this

0 Show 1 · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Anthony Kim · Mar 23, 2021 at 10:40 AM 0
Share

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.

avatar image

Answer by trowju · Jun 04, 2021 at 08:56 AM

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.

Comment

People who like this

0 Show 0 · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image

Answer by Jay Zuo · Oct 28, 2021 at 07:39 AM

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.

Comment

People who like this

0 Show 0 · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Navigation

Spaces
  • General Discussion
  • API and SDK Questions
  • Feature Requests
  • PlayStream
  • Bugs
  • Add-on Marketplace
  • LiveOps
  • Follow this Question

    Answers Answers and Comments

    3 People are following this question.

    avatar image avatar image avatar image

    Related Questions

    ValidateIOSReceipt ignoring PurchasePrice and CurrencyCode? 2 Answers

    Grant Item in Unity 1 Answer

    Reward VC when scrapping / disenchanting an item? 1 Answer

    TypeError: server.UpdateCatalogItems is not a function 1 Answer

    Can you manually increment or set a players LTV 2 Answers

    PlayFab

    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Runs on PlayFab
    • Pricing

    Solutions

    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA

    Engineers

    • Documentation
    • Quickstarts
    • API Reference
    • SDKs
    • Usage Limits

    Resources

    • Forums
    • Contact us
    • Blog
    • Service Health
    • Terms of Service
    • Attribution

    Follow us

    • Facebook
    • Twitter
    • LinkedIn
    • YouTube
    • Sitemap
    • Contact Microsoft
    • Privacy & cookies
    • Terms of use
    • Trademarks
    • Safety & eco
    • About our ads
    • © Microsoft 2020
    • Anonymous
    • Sign in
    • Create
    • Ask a question
    • Create an article
    • Post an idea
    • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Explore
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges