1.0.1 • Published 8 months ago

dynamic-qris v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

Qris Static to Qris Dynamic

Make static QRIS to dynamic QRIS

Instalation

npm i qris-dinamis

Import Module

// CommonJS
const qrisDinamis = require('qris-dinamis');

// ES Modules
import qrisDinamis from 'qris-dinamis'

Usage

Output String

const qris = '00020101021126570011ID........';
const result = qrisDinamis.makeString(qris, { nominal: '5000' });

Ouput File

const qris = '00020101021126570011ID........';
const result = qrisDinamis.makeFile(qris, { nominal: '5000' });
// or base64
const result = qrisDinamis.makeFile(qris, { nominal: '5000', base64: true });
// custom path
const result = qrisDinamis.makeFile(qris, { nominal: '5000', path: 'output/qris.jpg' });

Parameter List

ParamRequiredDescription
nominaltrueThe nominal amount that will be made into dynamic Qris.
taxtypefalseThere are 2 types of taxtypes: r for rupiah and p for percent.
feefalseThe amount of fee tax to be included in nominal. If percent, it will be multiplied by the value percent.
base64falseOutput a base64 string from a dynamic Qris image file. Only works in makeFile.
pathfalseCustom output path resulting from dynamic Qris image generation. Only works in makeFile.

Author

Rizki Aprita

1.0.1

8 months ago

1.0.0

8 months ago