Code Monkey home page Code Monkey logo

emvqr's Introduction

Hi dear, welcome to my github :octocat:

gif

"Slow and steady wins the race." ๐Ÿข

emvqr's People

Contributors

ahmadgika avatar dannielwhatever avatar lakshman1996 avatar lakshman24296 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

emvqr's Issues

Checksum mismatch

Steps to reproduce:

Input: 0002010102112632002816990007000000000000446800005204510153031445802LK5910Direct Pay6010Colombo 0561050050062100506s.69906304106f

I have found that computeCRC method is returning Uppercase characters which is causing the issue

Code Halts Indefinitely for Invalid QR

Expected Behaviour

Error should be thrown that the QR code decoding failed or the QR String is Invalid.

Current Behaviour

No result is returned and execution is halted

Code Example

const emvqr = require('emvqr');
const qrString = '000201010212041554652400000000428180014A0000000 0410105204507253035865802PK5912ABC HARDWARE6009ISLAMABAD622802129230797708870708000020776304a7bb540210';
const decodedQRJSON = emvqr.decode(qrString);
console.log('decodedQRJSON', decodedQRJSON);

Decoding QR Code with certain CRC code failing

Hi,

In case of QR string with CRC code starting with '0' or '00' or '000', for example
sample_qr_string = "00020201021126580014A000000615000101065887340212MBBQR1666987031000000000005204581253034585802MY5908TAKOYAKI6006PAHANG630400D7"

when I'm using

emvqr.decode(sample_qr_string),

its failing at validateChecksum because variable expectedCRC return 'D7' while variable checksum return '00D7'.

Is there any way to configure on this issue?

Additional Data field not returning nested object

Input Sample: 0002010102112632002816000007000000000000446800005204510153031445802LK5910Direct Pay6010Colombo 0561050050062100506s.test63045096

Prior to 0.0.5 the Additional data field would return an Object
{ id: "62", name: "Additional Data Field Template", len: 10, data: { "05": { id: "05", name: "Reference Label", len: 6, data: "s.test" } } }

But in the newer version the same data is returning different

{'62': { id: '62', name: 'Additional Data Field Template', len: 10, data: '0506s.test', rawData: '0506s.test' }}

Provide raw data without modifying values like Country code, Currency etc.

Hi

52 - Merchant Category Code
53 - Transaction Currency"
58 - Country Code

The decoded data for above ids contains extra value which is added to data for example: LK (Sri Lanka) for 58.
If there is a an options object that decode method can take and return raw data that would be awesome

I am willing to submit a PR as well

Thanks

Currency number is not ISO 4217

Hi. Some currencies in currency.json has not the 3-digit numeric representation as the specification required.
For example, "Argentine peso" the number is "032" not "32".

Add mcc "0000"

Hi man,

I found a issue in MCC , that list dont have a code "0000" as https://www.mreports.com/documentation/emr/mcc_codes.htm

Here there a example about a QrCode like mcc "0000" ,

[email protected]00005303986540550.005802BR5909Test name6009Sao Paulo62110507Payment63049C98

I tested a scenery with the mcc below and dont had problems
{
"mcc": "0000",
"edited_description": "No Mcc",
"combined_description": "No Mcc",
"usda_description": "No Mcc",
"irs_description": "No Mcc",
"irs_reportable": "",
"id": 981
}

I dont know all impacts about this change, but i leave here my suggestion :)

Encoder

Hi,
I need an encoder for emvqr for javascript. Can we integrate encoder to this project?

Maybe you know some other projects that can do it, it's also okay for me.

Thank you

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.