Enable TrueLayer for Magento
Set up the TrueLayer plugin and configure your settings to enable you to start accepting payments.
This guide assumes that you have already set up your TrueLayer account in Console. If you haven't, take a look at our Console configuration docs to learn how.
Before you start
This guide assumes that you already have:
- a Console account and client credentials
- a TrueLayer merchant account
- the correct webhook and redirect URIs for your webshop, uploaded to Console
- signing keys.
You need to set these up before you start working with the plugin itself.
Start in sandbox
Before moving any real money, make sure to test payments using sandbox credentials first. Check that General > Mode is set to Sandbox.
To access your Sandbox credentials in Console, ensure that the Live toggle in the top right is set to off.
1. Install the plugin using Composer
First, download and install Composer.
To install the plugin:
- Download the latest TrueLayer Payments for Magento plugin from GitHub.
- Run your SSH Console to connect to your Magento 2 store
- Locate the root of your Magento 2 store.
- Enter the command below in the command line of your root:
composer require truelayer/magento2
- Composer downloads the extension for you.
When it’s finished, clean the cache. - Deploy the content in your Magento environment using this command in your command line:
php bin/magento setup:upgrade
php bin/magento cache:clean
If Magento is running in production mode, deploy the static content below:
php bin/magento setup:static-content:deploy
- Go to your Magento admin portal. Navigate to Stores > Configuration > Sales > Payment Methods > TrueLayer Payments.
2. Configure your settings in Magento
- Under TrueLayer Payments, open the General tab.
- Enter the credentials in the table below.
Credential | Where to find it | Example value |
---|---|---|
Merchant account ID | Console > Payments > Merchant Account > Details | 363aglc4-1451-4089-b143-c2ad0e237322 |
Client ID | Console > Settings | sandbox-ecommerceplugins-1109e0 |
Client secret | Console > Settings > Saved to your desktop as a .txt file upon generation | bf945c77-b697-433c-b4f2-36dcc7e8c886 |
Path to private key | N/A | The path where your private key has been stored on your server |
KID | Console > Payments > Settings > Signing keys. | c7d2f140-7fdd-4272-b948-23c32a613546 |
- Go to the Settings tab of TrueLayer Payments in Magento. Enter this information in the appropriate fields:
Field | Value |
---|---|
Title | Pay by bank app |
Description | Fast and secure, with no need to enter your account details. |
Order Status for Pending Payment | Pending |
Generate Invoice | Yes |
Order Status for Complete Payment | Complete |
Send Email | Yes |
- Enable Debug Mode under Debug & Logging.
This ensures that both you and TrueLayer receive useful information if an error occurs.
Updated 4 days ago