Would you like to clone this notebook?

When you clone a notebook you are able to make changes without affecting the original notebook.

Cancel

Example usage of promptpay-qr

node v6.17.1
version: 1.0.1
endpointsharetweet
const qrcode = require('qrcode') const generatePayload = require('promptpay-qr') const mobileNumber = '000-000-0000' const amount = 4.22 const payload = generatePayload(mobileNumber, { amount })
// Convert to SVG QR Code const options = { type: 'svg', color: { dark: '#003b6a', light: '#f7f8f7' } } await new Promise((resolve, reject) => { qrcode.toString(payload, options, (err, svg) => { if (err) return reject(err) resolve(svg) }) })
Loading…

no comments

    sign in to comment