MODULES
...
eCommerce
Payment Gateways

Switching Between Multiple Payment Method Options

3min

Steps

Step 1

Use the ecommerce/checkout_standard - Including Payment Gateways in a Form Layout include to output multiple payment gateways inside your checkout form Liquid layout file.

Step 2

Once you have multiple options, you'll need a way to tell the system which to use. The following JS function will do that for you:

JS


Pass in the name of the Payment Gateway you wish to switch to as the only argument.

This can be applied to any action you like, such as clicking a radio button, or opening an accordion. e.g.

HTML
JS


If the JS function is not called, the default payment gateway from the multiple available gteways will be used.