Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should inactive card loose precedence over active card? #98

Open
aloisdg opened this issue Oct 1, 2022 · 2 comments
Open

Should inactive card loose precedence over active card? #98

aloisdg opened this issue Oct 1, 2022 · 2 comments
Assignees
Labels
question Further information is requested

Comments

@aloisdg
Copy link
Member

aloisdg commented Oct 1, 2022

Hello,

Right now the precedence rule is quite wacky. One way to improve it could be to strictly favorite an active card over an inactive one. To know which card id actually active or not we can follow the Wikipedia's table:

For example, we would have Visa over Switch for a card starting with 4903 and GPN over Solor for a card starting with 6334:

image

Our goal is to identify a card given a card number. I guess that there are more chance to cross the path of an active card over an inactive one.

This change could introduce a breaking change.

What do you think?

@aloisdg aloisdg added the question Further information is requested label Oct 1, 2022
@Tarmil
Copy link
Member

Tarmil commented Oct 3, 2022

We could make this another boolean option, eg preferActive = true, which you could explicitly set to false if you're working with potentially old cards.

@torendil
Copy link
Contributor

torendil commented Oct 3, 2022

We could set this as a boolean option, but set it to true by default. I think we already discussed this a while ago, I am in favor of trying the Ockham's razor approach: by default, return the most probable solution, and if it doesn't work, search for alternatives

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

6 participants