Laravel helper to generate the QRcode for ZATCA E-Invoicing system

Overview

Laravel-ZATCA

Unofficial package to implement ZATCA QRcode for E-Invoicing.

Requirements

  • PHP >= 7.4
  • An mbstring extension

Dependencies

Installation

Via composer:

$ composer require mphpmaster/laravel-zatca

Usage

Generate Base64

$value = \MPhpMaster\ZATCA\TagBag::make()
    ->setCompany('Company name')
    ->setVatId('1234567891')
    ->setInvoiceDate('2021-11-24T03:48:00Z')
    ->setInvoiceTotalAmount('100')
    ->setVatAmount('15')
    ->toBase64();

// > Output
// AQxDb21wYW55IG5hbWUCCjEyMzQ1Njc4OTEDFDIwMjEtMTEtMjRUMDM6NDg6MDBaBAMxMDAFAjE1

Generate Plain

$value = \MPhpMaster\ZATCA\TagBag::make()
    ->setCompany('Company name')
    ->setVatId('1234567891')
    ->setInvoiceDate('2021-11-24T03:48:00Z')
    ->setInvoiceTotalAmount('100')
    ->setVatAmount('15')
    ->toTLV();

Get The QRCode Image

$value = \MPhpMaster\ZATCA\TagBag::make()
    ->setCompany('Company name')
    ->setVatId('1234567891')
    ->setInvoiceDate('2021-11-24T03:48:00Z')
    ->setInvoiceTotalAmount('100')
    ->setVatAmount('15')
    ->toImage();

// <img src="$value" alt="ZATCA QRCode" />

Testing

vendor/bin/phpunit

Copyright and license

Copyright © 2021 hlaCk (https://github.com/mPhpMaster)

Licensed under the MIT License (https://github.com/mPhpMaster/laravel-zatca/blob/master/LICENSE) license.


You might also like...
Laravel FullCalendar.io Helper
Laravel FullCalendar.io Helper

Laravel 5 Full Calendar Helper For Laravel 4.2: use the laravel-4 branch This is a simple helper package to make generating http://fullcalendar.io in

`dd` is a helper method in Laravel. This package will add the `dd` to your application.

dd dd is a helper method in Laravel. This package will add the dd to your application. Install Run composer require larapack/dd 1.* For Laravel Larave

An opinionated support package for Laravel, that provides flexible and reusable helper methods and traits for commonly used functionality.

Support An opinionated support package for Laravel, that provides flexible and reusable helper methods and traits for commonly used functionality. Ins

Active State Helper for Laravel Blade

laravel-activehelper Active State Helper for Laravel Blade Lightweight and simple Introduction Basically we do like this. li class="sidebar {{ Reques

Laravel IDE Helper

Laravel IDE Helper Generator Complete PHPDocs, directly from the source This package generates helper files that enable your IDE to provide accurate a

Helper class for working with Laravel Mix in WordPress themes and plugins.

Hybrid\Mix Hybrid Mix is a class for working with Lavarel Mix. It adds helper methods for quickly grabbing asset files cached in the mix-manifest.json

Laravel Stats Helper

Laravel Stats Helper With laravel-stats-helper you can get the statistics of two values or an array of values. It allows you to get the difference, pe

A convenient helper for using the laravel-seo package with Filament Admin and Forms
A convenient helper for using the laravel-seo package with Filament Admin and Forms

Combine the power of Laravel SEO and Filament PHP. This package is a convenient helper for using the laravel-seo package with Filament Admin and Forms

Localization Helper - Package for convenient work with Laravel's localization features and fast language files generation
Localization Helper - Package for convenient work with Laravel's localization features and fast language files generation

Localization Helper Package for convenient work with Laravel's localization features and fast language files generation. Installation Via Composer $ c

Releases(1.0.1)
Owner
Moh. Php Master ..
Master ✔, Godfather 🐇, X Hacker ☠ Java, JS, TS, ..., DotNet, C/C#, PHP, SQL+HTML5+CSS3, Perl, React-Native, JSX, Expert in: ERP, API, Bash+DOS, En/Decoding ..
Moh. Php Master ..
Open Source Invoicing Solution for Individuals & Businesses

Introduction Crater is an open-source web & mobile app that helps you track expenses, payments & create professional invoices & estimates. Web Applica

Crater Invoice 6.7k Jan 4, 2023
A helper package to flash a bootstrap alert to the browser via a Facade or a helper function.

Alert Box (Laravel) A helper package to flash a bootstrap alert to the browser via a Facade or a helper function. <div class="alert alert-info fade in

Ben-Piet O'Callaghan 17 Dec 30, 2022
Cache-purge-helper - Additional instances where nginx-helper and lscache plugin should be purged.

cache-purge-helper Additional instances where nginx-helper and lscache plugin should be purged. Install Extract the zip file. Upload them to /wp-conte

Jordan 10 Oct 5, 2022
CSS Exfil helper script to generate injected CSS and corresponding HTML (inspired by mike gualtieri)

The PoC-CSS Exfill Basic Keylogger First of all i was developing bot stuff and i seen attribute=value] [target=_blank] in source code of website. This

Ahsen 6 Apr 2, 2022
Boilerplate code for protecting a form with proof of work. Uses javascript in the browser to generate the hashcash and PHP on the server to generate the puzzle and validate the proof of work.

Boilerplate code for protecting a form with proof of work. Uses javascript in the browser to generate the hashcash and PHP on the server to generate the puzzle and validate the proof of work.

Jameson Lopp 28 Dec 19, 2022
Generate trends for your models. Easily generate charts or reports.

Laravel Trend Generate trends for your models. Easily generate charts or reports. Support us Like our work? You can support us by purchasing one of ou

Flowframe 139 Dec 27, 2022
Laravel Query Helper was developed for laravel 7.2+ to help you optimize sql queries

Laravel Query Helper Laravel Query Helper was developed for laravel 7.2+ to help you optimize sql queries, this package will contain all advanced SQL

Syrian Open Source 15 Nov 20, 2022
The missing laravel helper that allows you to inspect your eloquent queries with it's bind parameters

Laravel Query Inspector The missing laravel helper that allows you to ispect your eloquent queries with it's bind parameters Motivations Let's say you

Mouad ZIANI 59 Sep 25, 2022
Laravel-Mix helper for projects with complex & multi assets.

Laravel-Mix helper for projects with complex & multi assets. ?? Getting started Since mix introduced in laravel 5.4 it is recommended to use this pack

Fandogh 27 Oct 4, 2022
A Laravel response helper methods.

A Laravel response helper methods. The package respond provides a fluent syntax to form array or json responses.

Najm Njeim 5 Nov 2, 2021