PHPackages                             fatwakb/laravel-qris - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. fatwakb/laravel-qris

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

fatwakb/laravel-qris
====================

Production ready QRIS dynamic generator for Laravel 10/11/12 and native PHP

00PHP

Since May 13Pushed 3w agoCompare

[ Source](https://github.com/xoxohigh/laravel-qris)[ Packagist](https://packagist.org/packages/fatwakb/laravel-qris)[ RSS](/packages/fatwakb-laravel-qris/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel QRIS
============

[](#laravel-qris)

Convert static QRIS into dynamic QRIS with custom amount support for Laravel and native PHP.

Supports:

- Decode QRIS image
- Parse QRIS payload
- Convert static QRIS to dynamic QRIS
- Add transaction amount
- Generate QR image
- Base64 output
- Save PNG file

---

Features
========

[](#features)

- Laravel 10, 11, 12 support
- Native PHP support
- Composer installable
- PSR-4 autoload
- QRIS CRC16 generator
- QRIS TLV parser
- PNG QR generator
- Base64 QR output

---

Requirements
============

[](#requirements)

- PHP 8.2+
- Composer

---

Installation
============

[](#installation)

Laravel
-------

[](#laravel)

```
composer require fatwakb/laravel-qris
```

---

Native PHP
----------

[](#native-php)

```
composer require fatwakb/laravel-qris
```

Then include Composer autoload:

```
require 'vendor/autoload.php';
```

---

Laravel Usage
=============

[](#laravel-usage)

Generate Dynamic QRIS From Raw String
-------------------------------------

[](#generate-dynamic-qris-from-raw-string)

```
use QRIS;

$qris = QRIS::fromString(
    '00020101021126670016COM.NOBUBANK.WWW01189360050300000879140214508135781657150303UMI51440014ID.CO.QRIS.WWW0215ID20253777777770303UMI5204541153033605802ID5914TEST MERCHANT6013JAKARTA BARAT6105111116304D41D'
)
->amount(10000)
->base64();

return view('welcome', compact('qris'));
```

---

Show QRIS In Blade
------------------

[](#show-qris-in-blade)

```

```

---

Generate From Uploaded QR Image
-------------------------------

[](#generate-from-uploaded-qr-image)

```
use QRIS;

public function generate(Request $request)
{
    $qris = QRIS::fromImage(
        $request->file('qris')->getPathname()
    )
    ->amount(25000)
    ->base64();

    return response()->json([
        'qris' => $qris
    ]);
}
```

---

Save QRIS PNG File
------------------

[](#save-qris-png-file)

```
use QRIS;

QRIS::fromString($rawQris)
    ->amount(50000)
    ->save(
        storage_path('app/public/qris.png')
    );
```

---

Native PHP Usage
================

[](#native-php-usage)

Generate QRIS
-------------

[](#generate-qris)

```
