đSteps to Switching Payment Gateway
Step 1 - Create a Payment Form
Create a Form in the Siteglide Admin and turn on the setting to use it as a payment form. (Basic Payment Form and Checkout will be supported as both support at least 2 payment gateways.)
Step 2 - Create a Custom Form Layout
In Code Editor or CLI, make a copy of the default form layout, ready to customise it.
In any Page, output your form and select the custom layout with the layout parameter. E.g. if your form ID is 1
, your layout should be at marketplace_builder/views/partials/layouts/forms/form_1/
my-custom-layout.liquid
For Basic Payment forms:
Step 3
For Checkout Forms, use the ecommerce/checkout_standard include to output multiple payment gateways inside your checkout form Liquid layout file.
For Basic Payment Forms:
Step 4
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:
Pass in the name of the Payment Gateway you wish to switch to as the only argument.
This can be applied as a callback to any JS event you like, such as clicking a radio button, or opening an accordion. e.g.
If the JS function is not called, the default payment gateway from the multiple available gteways will be used.
Last updated