Guides
Sandbox setup
How to configure the SDK to work with the EFL Leasing Online sandbox.
Obtain sandbox credentials
To use the sandbox you need:
- An API key.
- A partner identifier (
partnerId).
Both are provided by EFL. Refer to the official sandbox documentation for details on how to obtain them.
Configure the SDK for sandbox
use GuzzleHttp\Client as GuzzleClient;
use Imoli\EflLeasingSdk\Config;
use Imoli\EflLeasingSdk\EflClient;
use Imoli\EflLeasingSdk\Http\Adapter\GuzzleHttpAdapter;
$config = Config::sandbox(
apiKey: 'your-sandbox-api-key',
baseUrl: 'https://leasingonlineapi-sandbox.efl.com.pl'
);
$guzzle = new GuzzleClient([
'timeout' => 30,
'connect_timeout' => 10,
]);
$httpClient = new GuzzleHttpAdapter($guzzle);
$client = new EflClient($config, $httpClient);
Environment variables
In many projects it is convenient to store credentials in environment variables, for example:
EFL_API_KEYEFL_PARTNER_ID
Then you can build configuration like this:
$config = Config::sandbox(
apiKey: getenv('EFL_API_KEY'),
baseUrl: 'https://leasingonlineapi-sandbox.efl.com.pl'
);
$partnerId = getenv('EFL_PARTNER_ID');
Running integration tests
The SDK repository includes integration tests that exercise real calls against the sandbox API. They are triggered with:
EFL_API_KEY=your-sandbox-api-key \
EFL_PARTNER_ID=your-partner-id \
composer test:integration
Use these tests as a reference for real-world request/response flows and troubleshooting.