tecfinite/zatca-qr

This package takes ZATCA invoice data and generates ZATCA TLV string and Qr code image.

v1.0.1 2023-12-06 17:28 UTC

This package is auto-updated.

Last update: 2024-11-05 14:09:57 UTC


README

Latest Version on Packagist Total Downloads

E-invoice QR code generator, is a simple library to generate QR code image for e-invoice in KSA.

Installation

You can install the package via composer:

composer require tecfinite/zatca-qr

Usage

use Tecfinite\ZatcaQr\Tag\InvoiceTotalTag as ZatcaInvoiceTotalTag;
use Tecfinite\ZatcaQr\Tag\SellerTag as ZatcaSellerTag;
use Tecfinite\ZatcaQr\Tag\TimestampTag as ZatcaTimestampTag;
use Tecfinite\ZatcaQr\Tag\VatRegistrationNumberTag as ZatcaVatRegistrationNumberTag;
use Tecfinite\ZatcaQr\Tag\VatTotalTag as ZatcaVatTotalTag;
use Tecfinite\ZatcaQr\ZatcaQr;
$qr = new Tecfinite\ZatcaQr();
$qr = new ZatcaQr(
            new ZatcaSellerTag($this->sellerName),
            new ZatcaVatRegistrationNumberTag($this->sellerTaxId),
            new ZatcaTimestampTag($this->invoice->created_at),
            new ZatcaInvoiceTotalTag($this->invoice->total_fee),
            new ZatcaVatTotalTag($this->invoice->vat_fee)
          );

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.