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?
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?
What is the problem with signature? Do you have more information?
Does google play validation work with test purchases?
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.
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?
I've found the issue.
It was my mistake, I stringified ReceiptJson twice.