Enable Google Pay Using a Cartridge

If a merchant wants to customize the behavior of Google Pay, Salesforce provides hooks to implement in custom code. The merchant would deploy this code on their site in a cartridge developed by the merchant or someone on their behalf, such as a systems integrator.

If the merchant enables Google Pay through custom code in a cartridge, the merchant must:

Commerce Cloud Digital Extensions

Digital provides the constant METHOD_DW_ANDROID_PAY to the new Google Pay system Payment Method.

Digital provides hooks for payment authorization:

Note: The cartridge that contains the hook must be in the site cartridge path (not the Business Manager cartridge path).

The API class dw.extensions.paymentrequest.PaymentRequestHookResult indicates error reasons.

The <ispaymentrequest> ISML tag injects a default Google Pay button into the HTML page.

Note: If you have a legacy implementation of Android Pay, you may still have an <isandroidpay> ISML tag. The <isandroidpay> tag is deprecated, since Google no longer supports Android Pay. Change it to <ispaymentrequest> to implement the same feature with Google Pay with Payment Request.

The <ispaymentrequest> tag isn't handled by server-side ISML processing. These tags are processed exclusively in the Commerce Cloud paymentrequest.js. CSS automatically injected into the page ensures that these elements have no layout effect on the page in case they are not processed, due to error or any other reason.

Related Links

Google Pay

Google Pay Process

Google Pay Supported Hardware

Google Pay Supported Locales

Enable Google Pay in Your Storefront

Configuring Google Pay in Business Manager

Google Pay Button Injection

Google Pay Payment Authorization

Google Pay Integration into Digital Processes