0.0.5 • Published 2 years ago

vn-qr-pay v0.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Vietnam QR Pay

Thư viện hỗ trợ encode/decode mã QR của VietQR & VNPayQR

Install

npm install vn-qr-pay

Usage

import { encodeVietQr, encodeVnPay, decodeQr } from 'vn-qr-pay';

const code = encodeVietQr({
    account: '7868255197',
    bank: 'TECHCOMBANK',
    amount: '1000',
    additionalData: {
      purpose: 'Give Hung a cup of coffe',
    }
  });
NameTypeDescription
isValidbooleanKiểm tra tính hợp lệ của mã QR
initMethodstringPhương thức khởi tạo (11 - QR Tĩnh, 12 - QR động)
providerProviderThông tin nhà cung cấp
acquierIdAcquierIdThông tin acquierId
acquierNameAcquierNameThông tin acquierName
consumerConsumerThông tin người thanh toán
amountstringSố tiền giao dịch
currencystringMã tiền tệ (VNĐ: 704)
nationstringMã quốc gia
additionalDataAdditionalDataThông tin bổ sung
crcstringMã kiểm tra

Provider class

Thông tin đơn vị cung cấp mã QR (VietQR, VNPay)

NameTypeDescription
guidstringMã định danh toàn cầu
namestringTên nhà cung cấp

Consumer class

Thông tin người thanh toán

NameTypeDescription
bankBinstringMã ngân hàng
bankNumberstringSố tài khoản

AdditionalData class

Thông tin bổ sung

NameTypeDescription
billNumberstringSố hóa đơn
mobileNumberstringSố điện thoại di động
storestringTên cửa hàng
loyaltyNumberstringMã khách hàng thân thiết
referencestringMã Tham chiếu
customerLabelstringMã khách hàng
terminalstringTên điểm bản
purposestringNội dung giao dịch
0.0.3

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago