card-io / card.io-dmz

The core image-processing and machine-learning code for card.io, which is shared between iOS and Android.
Other
141 stars 116 forks source link

Does card.io-dmz support the length of card number is 14? #6

Closed wuyiwuxin closed 9 years ago

wuyiwuxin commented 9 years ago

I read the source code about card number process, there are Number Pattern Visa like - 16 numbers, Number Pattern Amex like - 15 numbers. But there is none Number Pattern Diners - 14 numbers, So does card.io support diners card with 14 numbers? if does, how?

dgoldman-pdx commented 9 years ago

@Vincent-Echo as you have observed, card.io is currently designed to handle only 5 card types -- four (VISA, MasterCard, Discover, JCB) with 16-digit numbers, and one (AmEx) with 15-digit numbers.

It would certainly be possible to add 14-digit support, but not an entirely trivial task. And doing so might impact the accuracy of card.io when scanning a 15- or 16-digit card.

Can you tell us more about the relative importance of supporting 14-digit Diners Club cards in your market?

wuyiwuxin commented 9 years ago

@dgoldman-ebay Thank you for reply. as I know, a part of person use diners credit card with 14 card numbers. Do you have done the test about impact of accurate rate after adding 14-digit support.

dgoldman-pdx commented 9 years ago

@Vincent-Echo we have never tried to add 14-digit support.

In the U.S., 14-digit Diners Club cards are used, basically, never. Is this different in your region? If so, what region is that? Have you any idea what percentage of your customers would like to pay with a 14-digit Diners Club card?

There are several spots in our code that expect either a 15- or 16-digit card number. It should not be overly difficult to find all of them and add the option of a 14-digit card (and also modify the card number prefix code to recognize a valid Diners Club prefix), but this is not currently high on our list of priorities.

Since the code is open-source, if you are a bit ambitious you could dive in and see if you can modify it yourself. We would be happy to review a Pull Request with such changes.

karlgoodhew commented 9 years ago

I just spent the day trying to do such a thing (Ecuador has 14 digit card numbers), which worked on cards with dark background/light numbers but not the issued grey cards (world background with grey numbers). If anyone else has been working on this, I would be glad to contribute the changes I've found so far, but not exactly useful in totality.