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:

have a supported phone

create a Google Developer account

update the custom code in a cartridge

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:

dw.extensions.paymentrequest.getPaymentRequest

Note: This hook is supported for legacy Android Pay
implementations. However, it is not currently supported for Google Pay
with Payment Request.

dw.extensions.paymentrequest.shippingAddressChange

dw.extensions.paymentrequest.shippingOptionChange

dw.extensions.paymentrequest.paymentAccepted.authorizeOrderPayment

dw.extensions.paymentrequest.paymentAccepted.placeOrder

dw.extensions.paymentrequest.paymentAccepted.failOrder

dw.extensions.paymentrequest.abort

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

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.