Simple Card Brand

Determine a payment card's brand from the leading digits and length of the account number (PAN).

Uses the rules documented on Wikipedia.

Card Brands

Conflicts

The Wikipedia page has several account number range conflicts that need to be researched.

Mix Commands

Installation

TO DO

If available in Hex, the package can be installed by adding simplecardbrand to your list of dependencies in mix.exs:

def deps do
  [
    {:simplecardbrand, "~> 0.1.0"}
  ]
end

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/simplecardbrand.

Adopting Elixir

I'm using this project as a reference for various quality control tools. As a result, there's a lot of code quality tools for such a small single-file module. Using the Adopting Elixir recommendations.