Download the PHP package saleh7/php-zatca-xml without Composer
On this page you can find all versions of the php package saleh7/php-zatca-xml. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download saleh7/php-zatca-xml
More information about saleh7/php-zatca-xml
Files in saleh7/php-zatca-xml
Package php-zatca-xml
Short Description An unofficial PHP library for generating ZATCA Fatoora e-invoices. This library facilitates the creation of compliant e-invoices, QR Codes, and certificates, as well as the submission of e-invoices to ZATCA's servers. It provides developers with an easy-to-use, customizable, and robust toolkit to integrate and automate ZATCA e-invoicing processes in PHP applications.
License MIT
Homepage https://github.com/Saleh7/php-zatca-xml
Informations about the package php-zatca-xml
Please feel free to contribute if you are missing features or tags
View Examples
Β·
Report a bug
Β·
Request a feature
Β·
Ask questions
π Introduction
PHP-ZATCA-XML is an unofficial PHP library for generating ZATCA Fatoora e-invoices. It simplifies the process of creating compliant e-invoices, generating QR codes, handling certificates, and submitting invoices to ZATCAβs servers.
Designed for easy integration, this library provides developers with a customizable, robust, and efficient toolkit to automate the ZATCA e-invoicing process in PHP applications.
π Planned Features
We are actively working on expanding the capabilities of this library. If you're a developer and would like to contribute, your help is highly appreciated! π‘
- [ ] XML to JSON Conversion β Support for converting invoices from XML to JSON format.
- [ ] JSON/Array to Invoice β Ability to generate invoices directly from JSON or array structures.
- [ ] Simplified Invoice Creation β Streamlined generation of Simplified Invoices, Debit, and Credit compliant with ZATCA simplified.
- [ ] Standard Invoice Creation β Streamlined generation Standard Invoices, Debit, and Credit compliant with ZATCA standards.
- [ ] Invoice to PDF Conversion β Generate PDF versions of invoices for easy sharing and record-keeping.
π‘ Got an idea? Feel free to suggest it or contribute!
Let's build something great together! π
β¨ Features
- π ZATCA-Compliant β Easily generate valid e-invoices for ZATCA regulations
- π Invoice Creation β Generate standard and simplified invoices in XML format
- π Digital Signing β Sign invoices securely to ensure compliance
- π· QR Code Generation β Automatically generate QR codes for invoices
- π‘ Direct Submission to ZATCA β Send invoices directly to ZATCAβs servers
- β‘ Lightweight & Fast β Optimized for performance and easy integration in PHP projects
- π Customizable & Extensible β Easily adapt the library to your needs
π Requirements
β PHP Version
- PHP 8.1 or higher
β Required PHP Extensions
Ensure the following PHP extensions are installed and enabled:
ext-dom
ext-libxml
ext-openssl
ext-hash
ext-mbstring
π Installation
π Usage
This library simplifies the process of generating ZATCA-compliant e-invoices, handling certificates, signing invoices, and submitting them to ZATCAβs API. Below are the main usage examples:
π 1. Generating a Compliance Certificate
First, generate a certificate signing request (CSR) and private key:
π 2. Requesting a Compliance Certificate from ZATCA
Once the CSR is generated, you need to request a compliance certificate from ZATCA's API.
π§Ύ 3. Generating an Invoice XML
Now that we have the compliance certificate, we can generate a ZATCA-compliant e-invoice in XML format.
βοΈ 4. Signing the Invoice XML
Before submitting the invoice to ZATCA, we need to digitally sign it using the compliance certificate obtained earlier.
π€ 5. Submitting the Signed Invoice to ZATCA
Once the invoice is digitally signed, it can be submitted to ZATCAβs API for compliance validation and clearance.
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
π¨βπ» Contributors
Thank you all for your continuous support and contributions!
Special Credits
This project has also benefited from some code snippets and ideas from the SallaApp/ZATCA repository. We appreciate their contribution to the community.
License
This project is licensed under the MIT License.
All versions of php-zatca-xml with dependencies
ext-mbstring Version *
ext-dom Version *
ext-libxml Version *
ext-openssl Version *
ext-hash Version *
sabre/xml Version ^4.0
guzzlehttp/guzzle Version ^7.9
phpseclib/phpseclib Version ^3.0