2.0.0 • Published 7 years ago

swish-qr v2.0.0

Weekly downloads
4
License
MIT
Repository
github
Last release
7 years ago

swish-qr Build Status

Generate a Swish QR code

Install

$ npm install swish-qr

Usage

const swishQr = require('swish-qr');

swishQr({
	amount: 100,
	lock: ['amount', 'number'],
	message: 'Lorem ipsum',
	number: '0701234567'
}).then(result => {
	console.log(result);
	//=> 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAL...'
});

API

swishQr(options)

Returns a Promise resolving in to a base64 string.

swishQr.sync(options)

Returns a base64 string.

swishQr.generateString(options)

Returns a formatted string that's used to create the QR code.

options

Required Type: Object

amount

Type: float Default: 0

The amount of money to send.

lock

Type: Array Default: []

Lock fields in the Swish application from user input.

message

Type: string Default: ''

Define a message to send.

number

Type: string Default: ''

The recipient.

Related

License

MIT © gillstrom

2.0.0

7 years ago

1.2.0

7 years ago

1.1.2

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.0

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago

0.0.0

7 years ago