Documentation

Add_filter | Multiple Lloyds accounts

We’ve put this guide together as a little helping hand for developers and designers. You’ll need a basic understanding of PHP to make the most of it.

Just a quick heads-up, we can’t provide support for custom code or offer any bespoke tweaks. Think of the snippets below as examples to guide you in the right direction.

This filter function enables you to define multiple Lloyds accounts on your website, allowing you to switch between accounts based on the order ID. The sample code provided below creates an array to hold the account details, including the store name and shared secret key.

Please use the following sample code as a reference and modify it as per your requirements:

PHP
12345678910111213141516
add_filter( 'ag_multi_account', 'custom_multi_account' );
function custom_multi_account( $order_id ) {

	// Create an array to hold the account details
	$account = array();
	
	// Here is where you can work out your logic to switch accounts based on the order ID

	// It's important that the array keys match the following
	$account['storename'] = 'store name here';
	$account['sharedsecret'] = 'shared secret here';

	// Return the array
	return $account;

}

Was this helpful?

Lloyds Bank Cardnet Connect

Don't already have the plugin? Get access now.

Still need help?

Our team are on hand to provide fast, helpful and professional support.

Support request
All systems operational

Back End Demo

Start exploring our fully functional demo site today.
Gain exclusive admin access to see what's possible.

Create your demo now

Front End Demo

Test drive our plugin on the demo site.

View Demo