1.0.6 • Published 2 years ago

th-promptpay-qr v1.0.6

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

th-promptpay-qr

Thailand Promptpay QR code library.

Installation

Use the node package manager npm to install TH-Promptpay-QR.

npm install th-promptpay-qr

Usage

// Node JS
var thPromptpayQr = require("th-promptpay-qr")

let promptpayCode = thPromptpayQr.getPromptpayCode('0812345678', 300);

// OR
// Return QR code as string drawing.

thPromptpayQr.getQRCodeString('0812345678', 300 (err, qr) => {
    console.log(qr);
})

//OR
// Retrurn png base64 encoding.

thPromptpayQr.getQRCodePNG('0812345678', 300, (err, png) => {
    console.log(png);
})

console.log(promptpayQRString);
// Type Script
import {getPromptpayCode, getQRCodeString, getQRCodePNG} from 'th-promptpay-qr';

let promptpayCode = getPromptpayCode('0812345678', 300);

// OR
// Return QR code as string drawing.

getQRCodeString('0812345678', 300, (err, qr) => {
    console.log(qr);
})

//OR
// Retrurn png base64 encoding.

getQRCodePNG('0812345678', 300, (err, png) => {
    console.log(png);
})

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago