Google Pay Button Injection

The Google Pay button can be automatically injected in the storefront via configuration. A storefront developer can also inject the button manually.

The <ispaymentrequest> ISML tag injects a Google Pay control in the HTML page supports optional attributes to:

The <ispaymentrequest> tag must have a closing tag.

If there are already items in the shopper's basket and they click the Google Pay button for an individual product, the items currently in the basket are stored temporarily during the purchase of the individual item. The original items are then restored to the basket after the single item has been purchased.

There are two places where a button can be injected via configuration:

Each is represented by a CSS selector plus additional information about how to inject. The CSS selectors are based on SiteGenesis DOM and CSS class names, but can work on sites other than SiteGenesis.

When the user clicks a Google Pay button, an XHR is made to get the latest basket information. The PaymentRequest browser API is then called to show the payment sheet user interface, passing the basket and configuration data. As the user interacts with the Payment Request user interface by selecting a shipping address, shipping method, and finalizing payment, XHR requests are made to the B2C Commerce server to keep the basket totals up to date. If the final payment authorization is successful, the browser navigates to the order confirmation page. The server-side processing and final redirect are customizable in B2C Commerce.

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.