question

icaro avatar image
icaro asked

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?

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.

1 Answer

·
brendan avatar image
brendan answered

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?

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.

icaro avatar image icaro commented ·

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


Does google play validation work with test purchases?

0 Likes 0 ·
brendan avatar image brendan icaro commented ·

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.

0 Likes 0 ·
icaro avatar image icaro commented ·

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?

0 Likes 0 ·
icaro avatar image icaro commented ·

I've found the issue.

It was my mistake, I stringified ReceiptJson twice.

0 Likes 0 ·

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.