kduma / emszmal-api
emSzmal Banking API wrapper in PHP
4.0.2
2024-04-26 08:44 UTC
Requires
- php: ~8.1
- ext-json: *
- guzzlehttp/guzzle: ^7.0
README
PHP wrapper for the emSzmal banking API — enables fetching account data and transaction history from Polish banks.
Full documentation: opensource.duma.sh/libraries/php/emszmal
Requirements
- PHP
^8.3 - Laravel
^12.0 || ^13.0(optional — also works as plain PHP)
Installation
composer require kduma/emszmal-api
Usage
$api = new \KDuma\emSzmalAPI\emSzmalAPI( api_id: $api_id, api_key: $api_key, cache_provider: new \KDuma\emSzmalAPI\CacheProviders\NoCacheProvider(), ); $session = $api->SayHello(); $accounts = $api->GetAccountsList( session: $session, credentials: new \KDuma\emSzmalAPI\DTO\BankCredentials( provider: \KDuma\emSzmalAPI\Enums\Bank::PKOiPKO, login: 'login', password: 'password', user_context: '', token_value: '', ), ); $api->SayBye(session: $session);
In Laravel, you can resolve the client from the container after adding credentials to .env:
$api = app(\KDuma\emSzmalAPI\emSzmalAPI::class);