"Slow and steady wins the race." ๐ข
dannielwhatever / emvqr Goto Github PK
View Code? Open in Web Editor NEWhelp to work with emv qr code specification for digital payments
help to work with emv qr code specification for digital payments
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"
.
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
Steps to reproduce:
Input: 0002010102112632002816990007000000000000446800005204510153031445802LK5910Direct Pay6010Colombo 0561050050062100506s.69906304106f
I have found that computeCRC method is returning Uppercase characters which is causing the issue
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' }}
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);
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
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 :)
HI
I am trying to scan below QR but its getting failed and give me INVALID EMV DATA error.
var emvqrDecoder = require("emvqr")
const example = '0002010102110216429975000027082904150000000000013412876003231036b0edd21412ebb229b0a2448f56a0108ALFHPKKA0224PK03ALFH00110010091230165204541153035865802PK5909SATRADERS6007Karachi6304E067';
const result = emvqrDecoder.decode(example);
console.log(result);
Can someone please tell me whats wrong here ?
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?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.