Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sunary/vietqr
Go-based library enables encoding and decoding for VietQR
https://github.com/sunary/vietqr
banking qrcode vietqr
Last synced: about 8 hours ago
JSON representation
Go-based library enables encoding and decoding for VietQR
- Host: GitHub
- URL: https://github.com/sunary/vietqr
- Owner: sunary
- License: other
- Created: 2024-11-05T16:36:00.000Z (3 months ago)
- Default Branch: master
- Last Pushed: 2024-12-18T08:51:43.000Z (about 1 month ago)
- Last Synced: 2024-12-18T09:39:02.758Z (about 1 month ago)
- Topics: banking, qrcode, vietqr
- Language: Go
- Homepage:
- Size: 7.81 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# vietqr
This Go-based library enables encoding and decoding for VietQR, a standardized QR code solution for payment and transfer services across Vietnam's NAPAS network. Once encoded, the QR code can be further customized using any QR code generator that converts text to QR format.
VietQR serves as a unified brand identity for QR-based payments and transfers, seamlessly processed through the NAPAS network, member banks, payment intermediaries, and domestic and international partners. It complies with the EMV Co. QR payment standards and adheres to foundational QR code standards established by the State Bank of Vietnam.
## Sample
```go
package mainimport (
"github.com/sunary/vietqr"
)func main() {
println("encode", vietqr.Encode(vietqr.TransferInfo{
BankCode: vietqr.TECHCOMBANK,
BankNo: "9796868",
Message: "gen by sunary/vietqr",
}))info, err := vietqr.Decode("00020101021138510010A00000072701210006970407010797968680208QRIBFTTA53037045802VN62240820gen by sunary/vietqr6304BE74")
if err != nil {
println("err", err.Error())
return
}println("bank_code", info.BankCode)
println("bank_no", info.BankNo)
println("amount", info.Amount)
println("message", info.Message)
}
```Run online: [go.dev/play](https://go.dev/play/p/g9gCWmI9iRl)