PHP code example of xsuchy09 / uctenkovka

1. Go to this page and download the library: Download xsuchy09/uctenkovka library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

xsuchy09 / uctenkovka example snippets


use xsuchy09\Uctenkovka\Request;
use xsuchy09\Uctenkovka\Uctenkovka;

$request = new Request();
$request->setEmail('[email protected]')
	->setPhone('777777777')
	->setBasicConsent(true)
	->setFik('B3A09B52-7C87-4014')
	->setBkp('01234567-89abcdef')
	->setDate('2018-03-17')
	->setTime('16:41')
	->setAmount(4570) // in hellers
	->setSimpleMode(false);

$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);

$request->setDateTime(DateTime::createFromFormat('Y-m-d H:i:s', $date)); // seconds are optional

use xsuchy09\Uctenkovka\Request;

$request = new Request([
    'email' => '[email protected]',
    'phone' => '777777777',
    'basicConsent' => true,
    'fik' => 'B3A09B52-7C87-4014',
    'bkp' => '01234567-89abcdef',
    'date' => '2018-03-17',
    'time' => '16:41',
    'amount' => 4570,
    'simpleMode' => false
]);