Skip to content

Should inactive card loose precedence over active card? #98

Open

Description

@aloisdg

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?

Activity

  1. Tarmil commented on Oct 3, 2022

    @Tarmil
    Member

    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.

  2. torendil commented on Oct 3, 2022

    @torendil
    Contributor

    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

Metadata

Metadata

Labels

questionFurther information is requested

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions