Skip to content

Commit

Permalink
README
Browse files Browse the repository at this point in the history
  • Loading branch information
janbarasek committed Jun 11, 2020
1 parent ff45720 commit 4a83d30
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,53 @@
CSOB Transaction authorizator
=============================

![Integrity check](https://github.com/baraja-core/csob-payment-authorizator/workflows/Integrity%20check/badge.svg)

Find transactions in mail box, parse and call authorization logic.

Install
-------

By Composer:

```shell
composer require baraja-core/csob-payment-authorizator
```

And create service by Neon:

```yaml
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:
```php
/** @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...
}
);
```

0 comments on commit 4a83d30

Please sign in to comment.