Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
Fix readme example.
  • Loading branch information
xsuchy09 authored Feb 14, 2019
1 parent 4bca877 commit 1fcfdb4
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ You can see tests which are included in this repository. To run that tests you n
#### How to send receipt/request into Uctenkovka

```php
use xsuchy09\Uctenkovka\Request;
use xsuchy09\Uctenkovka\Uctenkovka;

$request = new Request();
$request->setEmail('test@example.com')
->setPhone('777777777')
Expand All @@ -59,10 +62,11 @@ $request->setEmail('test@example.com')
->setAmount(4570) // in hellers
->setSimpleMode(false);

$this->uctenkovka->setMode(Uctenkovka::MODE_TESTING);
$this->uctenkovka->setSslCert(__DIR__ . '/../src/certs/test_crt.pem');
$this->uctenkovka->setSslKey(__DIR__ . '/../src/certs/test_key.pem');
$this->uctenkovka->send($request);
$uctenkovka = new Uctenkovka();
$uctenkovka->setMode(Uctenkovka::MODE_TESTING);
$uctenkovka->setSslCert(__DIR__ . '/../src/certs/test_crt.pem');
$uctenkovka->setSslKey(__DIR__ . '/../src/certs/test_key.pem');
$uctenkovka->send($request);
```

You can set date and time of receipt (request) at once with `\DateTime` object:
Expand All @@ -72,6 +76,8 @@ $request->setDateTime(DateTime::createFromFormat('Y-m-d H:i:s', $date)); // seco

You can set all of receipt/request values as array - not required param of `Request` constructor:
```php
use xsuchy09\Uctenkovka\Request;

$request = new Request([
'email' => 'test@example.com',
'phone' => '777777777',
Expand Down

0 comments on commit 1fcfdb4

Please sign in to comment.