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 deploys 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:

B2C Commerce Extensions

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

B2C Commerce 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 B2C Commerce 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.

X Privacy Update: We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used. By continuing to use this site you are giving us your consent to do this. Privacy Policy.