baraja-core / csob-payment-authorizator
CSOB payment authorizator.
Requires
- php: >=7.4.0
- baraja-core/bank-transaction-authorizator: ^1.0
- php-imap/php-imap: ^3.0 || ^4.0
Requires (Dev)
- phpstan/phpstan: ^0.12.18
- phpstan/phpstan-nette: ^0.12.6
- roave/security-advisories: dev-master
- tracy/tracy: ^2.7
This package is auto-updated.
Last update: 2024-12-08 18:40:14 UTC
README
Find transactions in mail box, parse and call authorization logic.
📦 Installation & Basic Usage
This package can be installed using Package Manager which is also part of the Baraja Sandbox. If you are not using it, you have to install the package manually following this guide.
A model configuration can be found in the common.neon
file inside the root of the package.
To manually install the package call Composer and execute the following command:
$ composer require baraja-core/csob-payment-authorizator
In the projects common.neon
you have to define the database credentials. A fully working example of configuration can be found in the common.neon
file inside this package.
You can define the configuration simply using parameters (stored in the super-global array parameters
).
For example:
services: - Baraja\CsobPaymentChecker\CsobPaymentAuthorizator(%tempDir%, %csob.imapPath%, %csob.login%, %csob.password%) parameters: csob: imapPath: xxx login: xxx password: xxx
⚙️ Usage
In presenter use it very simply:
/** @var CsobPaymentAuthorizator $csob **/ $csob = $this->context->getByType(CsobPaymentAuthorizator::class); // Or simply: $csob = new Baraja\CsobPaymentChecker\CsobPaymentAuthorizator(...); // Check account and authorize new orders $unauthorizedVariables = []; $csob->authOrders( $unauthorizedVariables, function (Transaction $transaction): void { // Do something... } );
📄 License
baraja-core/csob-payment-authorizator
is licensed under the MIT license. See the LICENSE file for more details.