1. Go to this page and download the library: Download eproduct/money-s3 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/ */
eproduct / money-s3 example snippets
use eProduct\MoneyS3\MoneyS3;
use eProduct\MoneyS3\Document\Invoice\InvoiceType;
use eProduct\MoneyS3\Document\Common\Partner;
use eProduct\MoneyS3\Document\Invoice\Company;
use eProduct\MoneyS3\Document\Common\Address;
// Initialize MoneyS3 with your company ICO
$moneyS3 = new MoneyS3('12345678');
// Create an issued invoice
$invoice = $moneyS3->addInvoice(InvoiceType::ISSUED)
->setDocumentNumber('VF2025090001')
->setDescription('Test Invoice')
->setIssued(new DateTime('2025-09-08'))
->setDueDate(new DateTime('2025-09-22'))
->setVariableSymbol('2025090001')
->setTotal(1000.00);
// Add a receipt
$receipt = $moneyS3->addReceipt();
// Generate XML
$xml = $moneyS3->getXmls();
echo $xml;
public function __construct(string $ico)
enum InvoiceType: string
{
case ISSUED = 'issued'; // Vydané faktury
case RECEIVED = 'received'; // Přijaté faktury
}
$moneyS3 = new MoneyS3('12345678');
// Process invoices in batches
foreach ($invoiceDataBatches as $batch) {
foreach ($batch as $data) {
$moneyS3->addInvoice(InvoiceType::ISSUED)
->setDocumentNumber($data['number'])
->setDescription($data['description'])
->setTotal($data['total']);
}
// Generate XML and clear memory
$xml = $moneyS3->getXml(true); // true flushes memory
// Process or save XML
processXml($xml);
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.