Add Google Pay to your checkout
Google transactions are credit card transactions in which card information is tokenised and encrypted by Google Payment Tokens.
Google Pay allows customers to make secure payments with any stored credit or debit card in their Google App.
- Apply at Google Developers merchant integration site to get your Google
merchantId
. - Contact CardCorp to tell your Account Manager that you want to activate Google Pay and obtain your
gatewayMerchantID
. - Add Google Pay as a Payment Brand in your integration script. The steps to do this will depend on what integration option you use.
- For COPYandPAY.
Configure the Google Pay object in thewpwlOptions
for generating the payment form.In the HTML for the checkout, addvar wpwlOptions = { googlePay: { gatewayMerchantId: "" merchantId: "" } }
GOOGLEPAY
in thedata-brands
<form action="{shopperResultUrl}" class="paymentWidgets" data-brands="VISA MASTER GOOGLEPAY APPLEPAY"></form>
- For SERVER-TO-SERVER, there are two APIs for Google Pay:
- Google Pay with the encrypted payment token.
You can send the encrypted payment token as is. Our gateway will handle the decryption and process the transaction. Send the following parameters together with other parameters in a server-to-server call:
ReplacepaymentBrand=GOOGLEPAY googlePay.paymentToken={ ... }
googlePay.paymentToken
with the JSON (payment token) received from the Google Pay API. - Google Pay with decrypted card information.
You can do the decryption yourself and send the decrypted card information with the usual card API:card.number
,card.expiryMonth
,card.expiryYear
,threeDSecure.verificationId
,threeDSecure.eci
, andgooglePay.source
(Possible values:web
orapp
). For examplepaymentBrand=GOOGLEPAY card.number=4200000000000000 card.expiryMonth=05 card.expiryYear=2022 threeDSecure.verificationId=ABiKYvXjhcB7AAc+K04XAoABFA== threeDSecure.eci=07 googlePay.source=web
- Google Pay with the encrypted payment token.
- For COPYandPAY.
And that's it - you're done!
Questions?
Visit our website and talk to the CardCorp customer service team for assistance.