Getting errors.google_pay.signature_invalid when doing Google Pay transaction
I am trying to do a Google Pay transaction with a test card, and I am always getting back an error message that says the signature is wrong:
"An error occurred processing a payment key=errors.google_pay.signature_invalid, message=The payment data contains an invalid signature. Please check the format of the signature and retry."
The payload we are sending looks like this:
{
"transaction": {
"google_pay": {
"payment_data": {
"signature": "<redacted>",
"protocolVersion": "ECv1",
"signedMessage": "{\"encryptedMessage\":\"<redacted>",\"ephemeralPublicKey\":\"<redacted>",\"tag\":\"<redacted>"}"
},
"test_card_number": "4111111111111111"
},
"amount": 7589,
"currency_code": "CAD"
}
}
-
If it helps, this is the google Pay payment method we are using on the client side in the Payment Request:
{supportedMethods: 'https://google.com/pay',data: {environment:'TEST',apiVersion:2,apiVersionMinor:0,merchantInfo: {//merchantId:'01234567890123456789',merchantName:'Example Merchant'},allowedPaymentMethods: [{type:'CARD',parameters: {allowedAuthMethods: ['PAN_ONLY', 'CRYPTOGRAM_3DS'],allowedCardNetworks: ['AMEX','DISCOVER','JCB','MASTERCARD','VISA']},tokenizationSpecification: {type:'PAYMENT_GATEWAY',parameters: {gateway:'spreedly',gatewayMerchantId:<spreedly environment key>}}}],transactionInfo: {totalPriceStatus:"FINAL",totalPrice:this.CheckoutProvider.totalAmount.toString(),currencyCode:this.LocationsProvider.getCurrentLocation().currency}} -
Hello,
We are getting the same error for any request (transaction or payment method):
<error key="errors.google_pay.signature_invalid">The payment data contains an invalid signature. Please check the format of the signature and retry.</error>
Could you please help us to resolve it?
Thank you!
-
Hi Alex,
Sorry to hear you're having trouble.
You'll need to have your Google Pay account enabled for production use before the Spreedly/GooglePay integration will work for testing. Have you requested production access from Google? Here are links to their documentation for this process for web and Android.
With production credentials in place, another round of testing needs to occur before the app is ready for Google to 'approve'. Google reviews your submitted integration in our production environment, with the API set to ENVIRONMENT_PRODUCTION, to complete end-to-end transactions.
I hope this is helpful—if you need further assistance feel free to reach out at support@spreedly.com
-
Hello,
I hope this message finds you well. We have successfully completed all the necessary steps on the production side related to Google Pay, including obtaining the signature after a successful purchase with real card details.
However, upon obtaining the signature, we encountered the following error:
<errors>
<error key="errors.google_pay.gateway_merchant_id_invalid">The gateway merchant ID specified does not match the assigned merchant ID.</error>
</errors>Could you please help us to resolve it?
Thank you!
Please sign in to leave a comment.
Comments
5 comments