Table of Contents
- Extension Installation
- Payment Gateway Configuration
- GoCardless Payments on Frontend
- Payment Details in the Backend Admin Section
- How to create an access token in GoCardless?
1. Extension Installation
For Magento Marketplace Customers
- Find the Composer name and version of the extension in the extension’s composer.json file.
- Login to your SSH and run:
- composer require meetanshi/magento-2-gocardless-instant-bank-pay --ignore-platform-reqs
- Enter your authentication keys. Your public key is your username; your private key is your password.
- Wait for Composer to finish updating your project dependencies and make sure there aren’t any errors.
- To verify that the extension is installed properly, run the command:
- php bin/magento module:status Meetanshi_Gocardless
- By default, the extension is probably disabled.
- Enable the extension and clear static view files:
- php bin/magento module:enable Meetanshi_Gocardless --clear-static-content
- php bin/magento setup:upgrade
- For Magento version 2.0.x to 2.1.x - php bin/magento setup:static-content:deploy
- For Magento version 2.2.x & above - php bin/magento setup:static-content:deploy –f
- php bin/magento cache:flush
- php bin/magento module:status Meetanshi_Gocardless
- For Meetanshi Customers
Extract the zip folder and upload our extension to the root of your Magento 2 directory via FTP.
Login to your SSH and run below commands step by step:
composer require guzzlehttp/guzzle --ignore-platform-reqs
php bin/magento setup:upgrade
For Magento version 2.0.x to 2.1.x - php bin/magento setup:static-content:deploy
For Magento version 2.2.x & above - php bin/magento setup:static-content:deploy –f
php bin/magento cache:flush
2. Payment Gateway Configuration
Log in to your Magento 2 Admin Panel and navigate to Stores > Configuration.
In the left panel, under Sales, select Payment Methods and scroll down to GoCardless Instant Bank Pay. In the GoCardless configuration section, you will find various settings to enable and configure the payment gateway:
- Enabled: This option allows you to activate or deactivate the GoCardless payment gateway. Setting it to "YES" enables the payment gateway.
- Title: Define the title that will appear on the checkout page for the GoCardless payment option.
- Show GoCardless Logo: Enabling this option will show the GoCardless logo to customers at the checkout.
- Sandbox Mode: This setting allows you to switch between live and sandbox environments. Use "YES" for testing purposes.
- Sandbox/Live Access Token: Input the token here to authenticate sandbox or live transactions.
Learn here how to get a GoCardless access token for your account.
In the configuration, you can also find additional settings to customize the payment experience, like:
- Payment from Applicable Countries: Select "All Allowed Countries" or choose specific countries to restrict the payment method availability.
- Payment from Specific Countries: This list allows you to specify individual countries where the GoCardless payment method will be available.
- Additional Information: This text will be displayed on the payment page to provide extra details to the customers.
- Debug: Enabling this option will log detailed transaction data for debugging purposes.
- Sort Order: Define the position of the GoCardless payment option among other payment methods.
Once done, click the “Save” button at the top-right.
3. GoCardless Payments on Frontend
Once configured, the GoCardless payment method will be available on the checkout page.
Customers can select GoCardless Instant Bank Pay as their payment method during the checkout process.
After selecting GoCardless as the payment method, customers will be redirected to GoCardless payment page.
The users can complete the transaction by entering their bank details.
On a successful transaction, the users are redirected back to the order success page.
Customers can view their payment details in the "My Orders" section of their account.
Payment method and transaction details are available for the customer to review.
4. Payment Details in the Backend Admin Section
Admins can also view payment details in the orders section of the Magento admin panel.
5. How to create an access token in GoCardless?
To use the extension for GoCardless payment gateway integration, you’ll first need an access token from your account. Here’s how to generate one:
Go to manage.gocardless.com and log into your account.
On the dashboard, expand the Developers section in the left menu bar and select “Developers.”
Now, on the developer’s dashboard, click Create > Access token.
Enter a name for the access token for your reference, select its scope (read/read and write) and click “Create access token.
The GoCardless access token will be generated and displayed in the popup. Note it down to use it for Magento 2 integration.