PHP code example of snadnee / php-abo-generator
1. Go to this page and download the library: Download snadnee/php-abo-generator 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/ */
snadnee / php-abo-generator example snippets
use Snadnee\ABOGenerator\ABOGenerator;
use Carbon\Carbon;
$senderParams = [
'bankAccount' => '11-123456789/0600',
'organisationName' => 'Company xyz',
];
$paymentGroups = [
'group1' => [
'dueDate' => Carbon::now(),
'payments' => [
[
'amount' => 1.5,
'bankAccount' => '112-987654321/3030',
'variableSymbol' => 1234,
'specificSymbol' => 4321,
'constantSymbol' => 1234,
'message' => 'Payment',
],
[
'amount' => 1.5,
'bankAccount' => '112-987654321/3030',
'variableSymbol' => 1234,
'specificSymbol' => 4321,
'constantSymbol' => 1234,
'message' => 'Payment',
],
]
],
];
$ABOGenerator = new ABOGenerator();
$result = $ABOGenerator->simpleGenerating($senderParams, $paymentGroups);
use Snadnee\ABOGenerator\ABOGenerator;
use Carbon\Carbon;
$ABOGenerator = new ABOGenerator('Company name');
$file = $ABOGenerator->addFile(ABOGenerator::PAYMENT);
$file->setSenderBank(0600);
$group = $file->addGroup();
$group->setSenderAccount(1234567890)
->setDate(Carbon::now());
// AccountNumber, amount, variable symbol
$group->addPayment("111-987654321/0300", 14323.43, 2220009813)
->setConstantSymbol('8')
->setSpecificSymbol('93653')
->setMessage('Message');
$group->addPayment("111-2424242424/0300", 1000.5, 2220009813)
->setConstantSymbol('8')
->setSpecificSymbol('93653')
->setMessage('Message');
$file2 = $ABOGenerator->addFile(ABOGenerator::INKASO);
$file2->setSenderBank(0600);
$group = $file2->addGroup();
$group->setSenderAccount(987654321);
$group->addPayment("174-987654321/0300", 1.5, 2220009813)
->setConstantSymbol('8')
->setSpecificSymbol('93653')
->setMessage('Zprava 1');
$group->addPayment("174-987654321/0300", 1234, 2220009813)
->setConstantSymbol('8')
->setSpecificSymbol('93653')
->setMessage('Zprava 2');
$group = $file2->addGroup();
$group->setSenderAccount(227757331);
$group->addPayment("174-987654321/0300", 100, 2220009813)
->setConstantSymbol('8')
->setSpecificSymbol('93653')
->setMessage('Zprava 1');
$group->addPayment("174-987654321/0300", 500, 2220009813)
->setConstantSymbol('8')
->setSpecificSymbol('93653')
->setMessage('Zprava 2');
$result = $ABOGenerator->generate();