PHPackages                             tttran/viet\_qr\_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. [Utility &amp; Helpers](/categories/utility)
4. /
5. tttran/viet\_qr\_generator

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

tttran/viet\_qr\_generator
==========================

VietQR generator by following vietqr specification

v0.7(4y ago)1824.5k↓48.9%19MITPHPPHP &gt;=7.0

Since Feb 28Pushed 1y ago2 watchersCompare

[ Source](https://github.com/trungthanh-tran/vietqr-generator)[ Packagist](https://packagist.org/packages/tttran/viet_qr_generator)[ RSS](/packages/tttran-viet-qr-generator/feed)WikiDiscussions main Synced 2w ago

READMEChangelogDependencies (2)Versions (8)Used By (0)

Introduction
============

[](#introduction)

Extension to generate Text according to VietQR Specification via account.

Import lib
==========

[](#import-lib)

```
{
  "require":{
    "tttran/viet_qr_generator": "v0.6"
  }
}
```

Examples
========

[](#examples)

\##Generate with amount

```
use tttran\viet_qr_generator\Generator;

        $gen = Generator()::create()
            ->bankId("VCB") // BankId, bankname
            ->accountNo("111111")// Account number
            ->amount(10000)// Money
            ->info("toto") // Ref
            ->generate();
        echo $gen; // Print text to generate QR Code
```

Generate permanently bank transfer
----------------------------------

[](#generate-permanently-bank-transfer)

```
use tttran\viet_qr_generator\Generator;

        $gen = Generator()::create()
            ->bankId("VCB") // BankId, bankname
            ->accountNo("111111")// Account number
            ->generate();
        echo $gen; // Print text to generate QR Code
```

Generate base64 image
---------------------

[](#generate-base64-image)

```
use tttran\viet_qr_generator\Generator;

        $gen = Generator()::create()
            ->bankId("VCB") // BankId, bankname
            ->accountNo("111111")// Account number
            ->amount(10000)// Money
            ->info("toto") // Ref
            ->returnText(false) // if true, return text. If false, return image in base64
            ->generate();
        $result = json_decode($gen->generate()); // Print text to generate QR Code
        echo $result->data; // image in base64
```

Ref:
====

[](#ref)

Functions

FieldType of parametersMeaningbankIdStringBank IDaccountNoStringBank Accountamountnumber with only one dot or notAmount to transfer. 1000. or 1000infoStringRefreturnTextboolreturn text if true. Otherwise, return base 64sizeintegersize of QR in pixelmarginintegermargin of QRlogoPathStringPath to logo in the center of imageisCardboolTrue when bank transfer via card no. False via account no. Default: false

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance30

Infrequent updates — may be unmaintained

Popularity39

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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

Every ~1 days

Total

7

Last Release

1626d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/24781c0352b37cb8302e3a2a4415dad8d73b08d581a4223f5f0f3f249502ce34?d=identicon)[trungthanh-tran](/maintainers/trungthanh-tran)

---

Top Contributors

[![trungthanh-tran](https://avatars.githubusercontent.com/u/822194?v=4)](https://github.com/trungthanh-tran "trungthanh-tran (5 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[t3/min

Extends TYPO3's compressor for JS and CSS with minifier. This may save you up to 60% of default compressed file size. Also compresses HTML output of TYPO3. Full composer support.

111.0M2](/packages/t3-min)[datatables.net/datatables.net-bs4

DataTables is a plug-in for the jQuery Javascript library. It is a highly flexible tool, based upon the foundations of progressive enhancement, which will add advanced interaction controls to any HTML table. This is DataTables with styling for \[Bootstrap4\](https://getbootstrap.com/docs/4.6/getting-started/introduction/)

2925.9k27](/packages/datatablesnet-datatablesnet-bs4)

PHPackages © 2026

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