braintree / credit-card-type

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

Add Elo support #76

Closed crookedneighbor closed 6 years ago

crookedneighbor commented 6 years ago

Adds Elo support to credit card type.

Elo bin ranges collide with Visa, Maestro, Discover and UnionPay.

We made the decision for Visa to have it detect as Visa unless we are certain that it is an Elo card.

The same goes for some, but not all, bin ranges for Maestro, Discover and UnionPay.

closes #57 closes #60 closes #65 closes #66

crookedneighbor commented 6 years ago

We made the adjustments talked about here: https://github.com/braintree/credit-card-type/pull/76#discussion_r206633629

When used within hosted fields, we take the first match anyway, so even if more than 1 card type is shown, it'll still show the first match and Elo has lower priority than the rest.

crookedneighbor commented 6 years ago

@jackellenberger and I were thinking the same thing.