mihkullorg / lhv-connect
LHV bank's CONNECT service for Laravel 6
Installs: 5 469
Dependents: 0
Suggesters: 0
Security: 0
Stars: 10
Watchers: 2
Forks: 8
Open Issues: 7
Requires
- php: ^7.2
- guzzlehttp/guzzle: ^6.5
- illuminate/config: ^6.0
- illuminate/support: ^6.0
Requires (Dev)
- phpunit/phpunit: ^8.0
This package is not auto-updated.
Last update: 2024-11-23 20:31:37 UTC
README
Quickstart
$ composer require mihkullorg/lhv-connect
NB! Service provider Mihkullorg\LhvConnect\LaravelLhvConnectServiceProvider::class is automatically registered.
In terminal run
$ php artisan vendor:publish
Open file config/lhv-connect.php and fill out the config. You can fill in info about several bank accounts and certifications.
Now you can create new LhvConnect object. The Config::get parameter lhv-connect.test means that the file lhv-connect.php and the array with the key 'test' is passed on.
$lhv = new LhvConnect(Config::get('lhv-connect.test'));
Test the connection. If there's no connection, Exception with 503 should be thrown.
$lhv->makeHeartbeatGetRequest();
Retrieve a message from LHV inbox
$message = $lhv->makeRetrieveMessageFromInboxRequest();
Delete the message from LHV inbox
$lhv->makeDeleteMessageInInboxRequest($message);
Retrieve all messages. This gets you all the messages but it also deletes all the messages from the inbox.
$messages = $lhv->getAllMessages();