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 /
  • Bugs /
avatar image
Question by icaro · Jan 30, 2017 at 10:02 PM · In-Game Economy

Google Play Validation - Invalid signature

Hi Playfab,

I'm trying to validate google play iap, but i'm getting Invalid signature error.

Here is my request payload:
{ "ReceiptJson": "\"{\\\"packageName\\\":\\\"com.bighutgames.bh18\\\",\\\"productId\\\":\\\"com.bighutgames.bh18.pack_1\\\",\\\"purchaseTime\\\":1485812824684,\\\"purchaseState\\\":0,\\\"purchaseToken\\\":\\\"fhinfmiglcbgmajmcpolfmpp.AO-J1OwHlVBe4AWPVZrk2PjL_x2PFyCS6nlK1HYAs_ZK2gS8KwMUTRQi5QeXezPJl7oPsQ1dl_bwsSmgPhE-rMRORbXrTZyDtzo9TJDGcjcQydHtmnELa6fW5CkXuDnNg1vHPZmA8ew4uy5Ntx0SfKf2e4zXWD1X7A\\\"}\"", "Signature": "LKbJP5HfYoM19cu8l36t1lDN7Mhd/wCsOKajK7sRVR0YM7SCLDXqWsAjt1thQdiOO3EFUqsp64FIiGrJmaDwzUo+YSQjPUU580H5xBFbqyD3W8DkcQMBF20Hx5WFyF8/y1dZiX+UaMWPPyUenPJFkrBCOhdUhuLpRCCEt0gHJNfmNdA0p+RH0YD2dxXkQ5jPcpb8X0B7SE3R52JF8LTgrk6t7H5r4NAuJw4PFHlAX/Z3wNpis2Bsl4LqXwzG9HG/Op8f6UVOHkxwG9btKI2XEi/7TsMVLkhULf84qG+vYUYmvtmTK4b4pcTzBKaHXWwQhvYmbhEty4cYfhIHh2h7Hg==" }

And the playfab response:
{"code":400,"status":"BadRequest","error":"InvalidReceipt","errorCode":1021,"errorMessage":"Invalid signature"}

Can you help me to solve this issue?

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

1 Reply

· Add your reply
  • Sort: 
avatar image
Best Answer

Answer by Brendan · Jan 30, 2017 at 10:23 PM

I can confirm that the signature in that call is indeed incorrect. How are you getting the signature that you're sending into the call?

Comment

People who like this

0 Show 4 · 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 icaro · Jan 31, 2017 at 12:13 AM 0
Share

What is the problem with signature? Do you have more information?


Does google play validation work with test purchases?

avatar image Brendan ♦♦ icaro · Jan 31, 2017 at 12:23 AM 0
Share

Technically, it could be either the signature itself or one of the values in your Google configuration (on the Add-ons page for Google). Can you re-check the configuration values?

And yes, test purchasing is enabled for Google Play receipts.

avatar image icaro · Jan 31, 2017 at 04:37 PM 0
Share

I just checked the Package ID and License Key again and they seem to be correctly set up.

And the signature I'm getting from the buy callback.

Do you have any other thoughts?

avatar image icaro · Jan 31, 2017 at 04:37 PM 0
Share

I've found the issue.

It was my mistake, I stringified ReceiptJson twice.

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

    2 People are following this question.

    avatar image avatar image

    Related Questions

    Noticed Odd Inventory behaviour 1 Answer

    Stackable Items show remaining uses of zero after adding the first and two after the second. 1 Answer

    Cannot Create More Than 1 Drop Table 1 Answer

    App Store iOS Receipt Validation - Error Code 21008 (production receipt sent to sandbox URL) 3 Answers

    Cloud Script issue with granting items 1 Answer

    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