Skip to content

redpixy/sg-paynow-qr

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SG PayNow QR

A PayNow QR Generator for Singapore.

asImage flag does not work for now due to issues finding decent QRCode with logo generators for NodeJS. The QR string returned can be used as the content for QR Code generators on the browser.

Installation

npm install --save @jeremyling/sg-paynow-qr

Usage Example

import * as pn from "@jeremyling/sg-paynow-qr";

const date = new Date();

const [qrString, error] = pn.generateQr({
  amount: 10.1, // Optional
  editable: 0, // 1 - Payment Amount is editable, 0 - Payment Amount not editable
  billNumber: "A12345", // Optional, defaults to '***' (User to input reference within payment app)
  merchantName: "Payee", // Optional, defaults to 'NA'
  merchantCountry: "SG", // Optional, defaults to 'SG'
  merchantCity: "Singapore", // Optional, defaults to 'Singapore'
  expiry: new Date(date.setDate(date.getDate() + 1)), // Optional, defaults to 1 day from now
  uen: undefined, // Required if mobile is null, PayNow registered UEN for businesses
  mobile: "+6591234567", // Required if uen is null, PayNow registered Mobile Number for P2P transfers
});

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • JavaScript 100.0%