Installation and setup
Requirements
Section titled “Requirements”- CS-Cart or Multi-Vendor 4.17.2 or later, PHP 7.4 to 8.3 with the OpenSSL and cURL extensions.
- Administrator access to the store’s admin panel.
- A TrueLayer account (https://console.truelayer.com). The sandbox is free and self-service: create an account and an app in Console and keep the Live switch off. Live payments need a live app and a live merchant account, which TrueLayer enables for your business (“To enable merchant accounts in production, contact us”, TrueLayer docs, Merchant accounts).
- A cron job on your server (see step 8).
Install the add-on
Section titled “Install the add-on”- Download the
kv_truelayer-<version>.zippackage from your Kavio Labs or CS-Cart Marketplace account. - In the admin panel, open Add-ons > Manage add-ons.
- Click the gear button and choose Manual installation, then upload the archive.
- Find TrueLayer Pay by Bank in the list and make sure its status is Active.
- Enter your license key under Settings > License (Kavio Labs downloads) and click Check now.
Connect TrueLayer (sandbox first)
Section titled “Connect TrueLayer (sandbox first)”Everything below happens on the add-on’s Connection page (Add-ons > Manage add-ons > TrueLayer Pay by Bank > Settings > Connection) and in TrueLayer Console. The page lists the exact addresses to copy.
- App and credentials. In Console create an app (sandbox) and copy its Client ID and Client secret into the Test (sandbox) credentials block.
- Return address. In Console open the app’s Application settings > Redirect URIs and add the Return address shown on the Connection page. It must be reachable over https; TrueLayer says a new redirect URI can take up to 15 minutes to take effect.
- Signing key. TrueLayer requires every payment request to be signed. Tick Generate a new key pair (or paste your own EC P-521 private key, created with
openssl ecparam -genkey -name secp521r1 -noout) and save. The page then shows the public key: upload it in Console under Payments > Settings > Signing keys. Console shows a key ID (KID) next to the uploaded key: enter it in Key ID and save. The private key is stored encrypted and is never shown again. - Webhook. In Console open Payments > Settings and enter the Webhook address of the mode as the Webhook URI (one address per app: the sandbox app gets the
m=testaddress, the live app them=liveaddress). - Press Save and test. A green message means the add-on could authenticate, the signing key and KID are accepted by TrueLayer (its
/test-signatureendpoint answers 204) and your merchant accounts were found. The GBP and EUR merchant account IDs are filled in automatically when they are empty; a payment is made into the merchant account of its currency. - Payment method. Open Administration > Payment methods, add a method (for example “Pay by bank”), choose the processor TrueLayer and activate it. Optional settings are described in Configuration.
- Test it. Place an order in GBP or EUR, choose the mock bank on TrueLayer’s page and log in with
test_executed(see TrueLayer’s “Test payments in sandbox”). The order becomes paid when the sandbox payment settles. - Cron. Add the cron job from the settings page (Cron section), every minute is fine. It re-reads payments and refunds that are still open and works off the webhook queue. Overlapping runs are prevented.
- Go live. Create the live app in Console, repeat steps 1 to 4 for the Live credentials block (live client ID and secret, a live signing key and its KID, the live return address and webhook address), press Save and test, then switch Mode to Live.
Multi-Vendor
Section titled “Multi-Vendor”Payments always go into the marketplace owner’s merchant account: TrueLayer merchant accounts belong to one client ID and the Payments API v3 has no marketplace split. Only the marketplace administrator sees the Connection page; vendors can look at the payment tab of their orders but cannot refund.
Update
Section titled “Update”- Upload the new package the same way. Your settings, credentials, keys and data are kept.
- The add-on adds missing tables and settings by itself on the first request after the update.
See CHANGELOG for what changed in each version.
Uninstall
Section titled “Uninstall”Open Add-ons > Manage add-ons, click the add-on’s gear button and choose Uninstall. This removes the add-on’s settings, language variables and database tables, including the stored credentials and keys. Refund your open payments first and wait until no payment is pending (the Payments list has no Pending rows): payments that settle after the tables are gone cannot update their order.