开发者

How to get card type information using unimag credit card reader

开发者 https://www.devze.com 2023-03-21 21:37 出处:网络
I want to integrate card swipe feature 开发者_JS百科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 i

I want to integrate card swipe feature 开发者_JS百科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.


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 :-)


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消