Skip to content

marqueswsm/emvco-merchant-parse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EMVCo-parser

It is an npm package developed to allow you to parse EMVCo Merchant Presented QRCodes. If you want to learn more about EMVCo, take a look at here. The package was developed based on version 1.0 of the EMVCo documentation.

How to install

It is provided as an npm package:

npm install emvco-merchant-parse

How to import

You can import this package using CommonJs:

const { Parse } = require('emvco-merchant-parse');

Or using ES6:

import { Parse } from 'emvco-merchant-parse';

How to use

You can call the function Parse with a qrcode as a parameter:

const { Parse } = require('emvco-merchant-parse');

const qrcode = '00020101021226160012com.merchant52040123540518.765802BR5909Pet Store6012Porto Alegre610991530-0208008000212';

const parsedQrcode = Parse(qrcode);

The response will be provided as an object:

{
  '26': { 
    '00': 'com.merchant',
  },
  '52': '0123',
  '54': '18.76',
  '58': 'BR',
  '59': 'Pet Store',
  '60': 'Porto Alegre',
  '61': '91530-020',
  '80': {
    '00': '12',
  },
  '01': '12',
  '00': '01'
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published