braintree / credit-card-type

A library for determining credit card type
MIT License
980 stars 154 forks source link

Add new VISA length ranges (e.g. V Pay) #49

Closed aronwoost closed 7 years ago

aronwoost commented 7 years ago

Fixes #43

Those 13 digits VISAs are no longer used. Or are they? Whatever, we all need to follow specs. And the specs say they exist. Sometimes you can argue with your PO, sometimes you can't. When it comes to payment related stuff chances are that you can't.

This PR adds support for 13 digits VISAs.

This PR adds support for VISA 13 - 19 length change, which is used by VISA debit cards (source, what is V Pay).

crookedneighbor commented 7 years ago

Do you have a more detailed source for Visa cards that may be lengths between 13-15 and 17?

The source you provided seems to assert that Visas can be a minimum length of 13, but I don't see anything that asserts explicitly that Visas can be of length 14, 15 or 17. I'd also prefer to see an official spec from Visa about the ranges their cards can be.

aronwoost commented 7 years ago

It's indeed very hard for us the get robust official data.

In this doc is says: image

And I indeed found nothing explicitly V-Pay.

Maybe you guys have more information?

skunkworks commented 7 years ago

@aronwoost That document seems to be stating that PANs can be 13-19 digits for all card networks because the table below it mentions MasterCard, Discover, etc.

Is it just 13-digit PAN lengths for Visa that you need to support?

aronwoost commented 7 years ago

Initially this PR was about adding VISA-13, yes (see strikethrough text). Because various docs describe that those PANs do exists.

After further research I was approached to also VISA-13 to VISA-19. However, my own research didn't result in official docs.

This is very frustrating for me. The product ppl "just want to be save". I want to use OSS (thank you peeps!) and don't fork. If you have further informations it would be greatly appreciated.

crookedneighbor commented 7 years ago

To our knowledge, 13 digit visa cards are no longer in circulation. If somehow there are still 13 digit visas floating around, Braintree's backend servers will not be able to process them anyway.

So, for our perspective, it does not make sense to add 13 digit visas as an option to this library. I think a fork is still your best option.

intelliot commented 7 years ago

@aronwoost Due to the reasons above, we cannot merge this PR. In this case, you may need to fork the library. If you have any other concerns, please let us know!

aronwoost commented 7 years ago

👍