Skip to content

Instantly share code, notes, and snippets.

@make-github-pseudonymous-again
Created March 2, 2020 22:39
Show Gist options
  • Save make-github-pseudonymous-again/d9bb05e3addedeea1e6b32b30061b0c5 to your computer and use it in GitHub Desktop.
Save make-github-pseudonymous-again/d9bb05e3addedeea1e6b32b30061b0c5 to your computer and use it in GitHub Desktop.
Generate SEPA payment QR Code
#!/usr/bin/env node
const generateQrCode = require('sepa-payment-qr-code');
const QRCode = require('qrcode');
const payload = generateQrCode({
name: 'John Doe',
iban: 'BE71096123456769 ',
amount: 999999,
});
process.stdout.write(payload);
process.stdout.write('\n');
const options = {
errorCorrectionLevel: 'H',
type: 'terminal',
};
QRCode.toDataURL(payload, options, function (err, url) {
console.log(url);
});
QRCode.toString(payload, options, function (err, string) {
console.log(string);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment