zarulizham/laravel-duitnow-qr

Malaysia's National QR Payment repository for Laravel

Maintainers

Package info

github.com/zarulizham/laravel-ambank-duitnow-qr

Homepage

pkg:composer/zarulizham/laravel-duitnow-qr

Fund package maintenance!

ZarulIzham

Statistics

Installs: 5 899

Dependents: 0

Suggesters: 0

Stars: 4

Open Issues: 2

1.0.6 2026-03-07 04:38 UTC

README

Installation

You can install the package via composer:

composer require zarulizham/laravel-duitnow-qr

You can publish and run the migrations with:

php artisan vendor:publish --tag="laravel-duitnow-qr-migrations"
php artisan migrate

You can publish the config file with:

php artisan vendor:publish --tag="laravel-duitnow-qr-config"

This is the contents of the .env file:

DUITNOW_QR_CLIENT_ID=
DUITNOW_QR_CLIENT_SECRET=
DUITNOW_QR_CHANNEL_TOKEN=
DUITNOW_QR_PREFIX_ID=
DUITNOW_QR_QR_ID=

Optionally, you can publish the views using

php artisan vendor:publish --tag="laravel-duitnow-qr-views"

You can also publish the callback controller stub to your app:

php artisan vendor:publish --tag="laravel-duitnow-qr-controllers"

Usage

$duitNowQR = new ZarulIzham\DuitNowQR();

Dashboard SPA (Transactions & Payments)

This package now provides a gated dashboard with Vue.js components and Bootstrap 5.3.

  • Transactions page: list all transactions and open a transaction details page (with related payments).
  • Payments page: list all payments with optional filters by biz_id or end_id.

Default URL:

/duitnow-qr/dashboard

Set your access gate (for example in AppServiceProvider::boot):

use DuitNowQR;

DuitNowQR::auth(function ($request) {
	return $request->user()
		&& $request->user()->role('Programmer');
});

Dashboard and dashboard API access are denied by default. You must configure DuitNowQR::auth(...) and return true for authorized users. Dashboard API endpoints still require an authenticated user.

Dashboard route settings are configurable in config/duitnowqr.php:

'dashboard' => [
	'path' => env('DUITNOW_QR_DASHBOARD_PATH', 'duitnow-qr/dashboard'),
	'middleware' => ['web'],
],

Security Vulnerabilities

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

License

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