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 own Google
merchantId. - Contact CardCorp to tell your Account Manager that you want to activate Google Pay. The account manager will give you 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 the
wpwlOptionsfor generating the payment form. Enter thegatewayMerchantIdand yourmerchantIdin the following object.In the HTML for the checkout, addvar wpwlOptions = { googlePay: { gatewayMerchantId: "", merchantId: "" } }GOOGLEPAYin 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.paymentTokenwith 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:weborapp). For example:paymentBrand=GOOGLEPAY card.number=4200000000000000 card.expiryMonth=05 card.expiryYear=2026 threeDSecure.verificationId=ABiKYvXjhcB7AAc+K04XAoABFA== threeDSecure.eci=07 googlePay.source=web
- 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:
- For COPYandPAY.
Configure the Google Pay object in the
And that's it - you're done!
Questions? Visit our website and talk to the CardCorp customer service team for assistance.