Closed rainmedia closed 6 years ago
Your scans look a little different that what the generic regex will recognize. I see a "ç" in the name, and a "ş" later on. I wonder if it's a character set encoding issue.
Here's something to try: In the file demo-simple.html, change the <form>
tag to <form accept-charset="UTF-8">
or to <form accept-charset="ISO-8859-1">
. Possibly that could make a difference.
Thank you for your reply Carl. The format that I posted above was generated on a notepad.
After your reply I changed my keyboard layout to English and restarted my PC and swiped the card it worked with most of the cards.
The form populated with correct data except the one below.
%BXXXXXXXXXXXXXXXX^HARGREAVES/TIMOTHY.MR ^18112019420244000001 199 ?;XXXXXXXXXXXXXXXX=18112019420244019901?
I tested on the page demo-events.html with and without accept-charset="UTF-8"
nothing changed.
This time I have the following output.
Card: Generic
Line1: XXXXXXXXXXXXXXXX^HARGREAVES/TIMOTHY.MR ^18112019420244000001 199
Line2:
Line3:
Please see the screenshot below https://i.imgur.com/p1tgekC.jpg
The only difference between two cards is: the number 199 has two spaces on the right and 6 spaces on the right. The rest of the format is same. Can you help me out with reading this type of cards? Thank you again.
The problem is the "." character in the cardholder name. All the card examples I used didn't have that.
I updated the built-in parsers to recognize it as an additional field called "honorific", and added your card sample as a unit test for each card (after changing the name to "PERSON\RANDOM.MR").
Download the latest version, and try your card again. Get it straight from GitHub, not NPM. If this works, I'll bump the version number and publish the update there.
Thank you so much. All the cards are working now. This script is lifesaver.
I have MSR90 USB 3-Track Magnetic Credit Card Reader. Ebay link. When I swipe the credit cards I get the following formats:
%B5217XXXXXXXXX&BONBONI.JOHNNYçMR &XXXXXXXXXXXXXXXXXXXX 199 :şXXXXXXXXXXXXXXXX-XXXXXXXXXXXXXXXX19901:
%b4564XXXXXXXXXXXX&hargreaves.tımothy w &XXXXXXXXXXXXXXXXXXXXXXXXXXXXX000:Ş4564XXXXXXXXXXXX-XXXXXXXXXXXXXXXX0000:
But I don't get any result when I try demo-simple.html and demo-events.html
I only get the following output.
Have I got the wrong reader or do I need to add a Custom Card Parser?
console.log