I want to integrate card swipe feature in my application using unimag card reader device provided by ID Tech. It provides name, account number and expiry date in a single string. But no information about the card type. Is there a way to retrieve the information about the "The type of Card" user hols. Like visa, master, etc.
Asked
Active
Viewed 1,697 times
0
-
More of a localised hardware question than a programming question. – Abizern Jul 21 '11 at 08:29
-
hey can you please guide me about implementing Card Swipe Feature in ios i am in big trouble while using unimag card reader device provided by ID Tech. – BhavikKama Apr 12 '13 at 05:05
2 Answers
1
Card type is determine from first couple of digits
example code here http://cuinl.tripod.com/Tips/o-1.htm
a quick google for implementations :-)

jay
- 11
- 1
0
The cliff notes version:
If card starts with:
3 - Amex (15 digits)
4 - Visa (13-19 digits, usually 16)
5 - Mastercard (16 digits)
6 - Discover (16 digits)
There are some other more rare card types like JCB and Diners which you might need to account for if your solution has to deal with those.

markiyanm
- 348
- 1
- 5
- 18