PHPackages                             cuongnm/viet\_qr\_pay\_generator - 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. [Payment Processing](/categories/payments)
4. /
5. cuongnm/viet\_qr\_pay\_generator

ActiveLibrary[Payment Processing](/categories/payments)

cuongnm/viet\_qr\_pay\_generator
================================

VietQR Pay Package

v1.0.0(1y ago)00MITPHPPHP &gt;=8.2

Since May 8Pushed 1y ago1 watchersCompare

[ Source](https://github.com/cuongjpitdnu/vietqr-pay-generator)[ Packagist](https://packagist.org/packages/cuongnm/viet_qr_pay_generator)[ Docs](https://github.com/endroid/qr-code)[ RSS](/packages/cuongnm-viet-qr-pay-generator/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

Introduction
------------

[](#introduction)

Library supporting VietQR, VietQRPay

Installation
------------

[](#installation)

Use [Composer](https://getcomposer.org/) to install the library. Also make sure you have enabled and configured the [GD extension](https://www.php.net/manual/en/book.image.php) if you want to generate images.

```
composer require cuongnm/viet_qr_pay_generator
```

Import lib
----------

[](#import-lib)

```
{
    "require": {
        "cuongnm/viet_qr_pay_generator": "^1.0"
    }
}
```

Tạo mã VietQRPay
----------------

[](#tạo-mã-vietqrpay)

```
use cuongnm\viet_qr_pay_generator\QRPay;

    $merchantId = '123456789'; // Replace with your merchant ID
    $acqId = '987654321'; // Replace with your acquirer ID
    $amount = 10000; // Amount in VND
    $ref = 'Test Transaction'; // Reference or description of the transaction
    $returnText = true; // Set to true to return text, false for image in base64
    $content = QRPay::create()
        ->merchantId($merchantId) // merchant id
        ->acqId($acqId) // acquirer id
        ->amount($amount) // Money
        ->info($ref) // Ref
        ->category('5611') // Adding category
        ->returnText($returnText) // if true, return text. If false, return image in base64
        ->generateVietQRPay();

    // Debug output
    echo "\nGenerated VietQR content: " . $content . "\n";
    // Generated VietQR content: {"code":200,"desc":"ok","data":"00020101021238560010A0000007270126000998765432101091234567890208QRIBFTTA5204561153037045405100005802VN62200816Test Transaction6304C3FA"}
```

Tạo mã VietQR
-------------

[](#tạo-mã-vietqr)

```
use cuongnm\viet_qr_pay\QRPay;

      $merchantId = '0102154778';
      $merchantName = 'TUGIACOMPANY';
      $store = 'TU GIA COMPUTER';
      $terminal = 'TUGIACO1';
      $qrPay = QRPay::initVNPayQR(
        $merchantId,
        $merchantName,
        $terminal,
        $terminal
      );
      $content = $qrPay->build();

      echo $content;
      // 00020101021126280010A0000007750110010531314453037045408210900005802VN5910CELLPHONES62600312CPSHN ONLINE0517021908061613127850705ONLHN0810CellphoneS63047685
```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance49

Moderate activity, may be stable

Popularity0

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

369d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4df2f28699f152f4a732310721278121bb19128b8fd1fc662df51977d185e663?d=identicon)[cuongjpitdnu](/maintainers/cuongjpitdnu)

---

Tags

phpqrcodeqrcodevietqrcuongnmvietqrpayqrcode napas

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/cuongnm-viet-qr-pay-generator/health.svg)

```
[![Health](https://phpackages.com/badges/cuongnm-viet-qr-pay-generator/health.svg)](https://phpackages.com/packages/cuongnm-viet-qr-pay-generator)
```

###  Alternatives

[endroid/qr-code

Endroid QR Code

4.8k67.6M348](/packages/endroid-qr-code)[endroid/qr-code-bundle

Endroid QR Code Bundle

32110.6M17](/packages/endroid-qr-code-bundle)[amirezaeb/heroqr

A Powerful QR Code Management Library For PHP

9510.3k](/packages/amirezaeb-heroqr)[dfridrich/qr-platba

Generování QR Plateb a QR Faktur v PHP.

47270.8k1](/packages/dfridrich-qr-platba)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
