Download the PHP package hazem7575/zatca without Composer
On this page you can find all versions of the php package hazem7575/zatca. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download hazem7575/zatca
More information about hazem7575/zatca
Files in hazem7575/zatca
Package zatca
Short Description ZATCA (Fatoora) e-invoicing implementation for Saudi Arabia
License MIT
Informations about the package zatca
Hazem/Zatca
ZATCA (Fatoora) e-invoicing implementation for Saudi Arabia.
please visit our documentation.
Table of Contents
- Installation
- Requirements
- Configuration
- Basic Usage
- Device Registration
- Invoice Creation
- Invoice Submission
- Invoice Status
- Customization
- API Reference
- Database Schema
- Security
- Contributing
- License
Installation
Install the package via Composer:
Requirements
- PHP ^7.4|^8.0
- Laravel ^8.0|^9.0|^10.0
- OpenSSL Extension
- JSON Extension
- DOM Extension
- cURL Extension
Configuration
app.php
-
Publish configuration and migrations:
-
Run migrations:
- Configure your
.env
file:
Basic Usage
Device Registration
Add the HasZatcaDevice
trait to your model:
Register a new device:
Invoice Creation
Add the HasZatcaInvoice
trait to your model:
Create an invoice using the fluent interface:
Invoice Submission
Submit the invoice:
Or submit with custom data:
Invoice Status
Check invoice status:
API Reference
Device Facade
Zatca Facade
HasZatcaDevice Trait Methods
HasZatcaInvoice Trait Methods
Database Schema
devices_zatca Table
id
- Primary keydeviceable_type
- Model typedeviceable_id
- Model IDrequest_id
- ZATCA request IDstatus
- Device statusdisposition_message
- Status messagebinary_security_token
- Security tokensecret
- Device secreterrors
- Error messages (JSON)private_key
- Private keypublic_key
- Public keycsr_content
- CSR contenttimestamps
orders_zatca Table
id
- Primary keyorderable_type
- Model typeorderable_id
- Model IDinvoice_number
- Invoice numberuuid
- Unique identifierinvoice_hash
- Invoice hashsigned_invoice_xml
- Signed XMLstatus
- Invoice statusis_reported
- Reporting statusis_cleared
- Clearance statuswarnings
- Warning messages (JSON)errors
- Error messages (JSON)response
- Full response (JSON)submitted_at
- Submission timestamptimestamps
Security
- Row Level Security (RLS) enabled for all tables
- Hash chaining for invoice integrity
- Secure storage of private keys and secrets
- Authentication required for all operations
- Data access controlled through policies
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This package is open-sourced software licensed under the MIT license.
All versions of zatca with dependencies
ext-openssl Version *
ext-json Version *
ext-dom Version *
ext-curl Version *
illuminate/support Version ^8.0|^9.0|^10.0
illuminate/database Version ^8.0|^9.0|^10.0
salla/zatca Version *