PHP code example of sunfoxcz / cetelem

1. Go to this page and download the library: Download sunfoxcz/cetelem 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/ */

    

sunfoxcz / cetelem example snippets


use Sunfox\Cetelem\Cetelem;

$storage = new Nette\Caching\Storages\FileStorage(__DIR__ . '/tmp');
$client = new GuzzleHttp\Client;
$cetelem = new Cetelem(2044576, $client, $storage);
$cetelem->setDebug(TRUE);

// Pokud nepoužíváte v Nette, je dobré dát cache i AnnotationsParseru
\Nette\Reflection\AnnotationsParser::setCacheStorage($storage);

$uver = new Cetelem\CetelemUver;
$uver->kodBaremu = '102';
$uver->kodPojisteni = 'A3';
$uver->cenaZbozi = 12000;
$uver->pocetSplatek = 12;
$uver->primaPlatba = 2000;
$uver->odklad = 2;

$cetelem->calculate($uver);
print_r($uver);