Skip to content

zudochkin/elixir-bank-card-info

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BankCardInfo

Build Status Hex.pm Version Documentation

Get brand, card type and country by first digits of a bank card.

Installation

The package can be installed by adding bank_card_info to your list of dependencies in mix.exs:

def deps do
  [{:bank_card_info, "~> 0.0.2"}]
end

Usage

BankCardInfo.get "45717360"

{:ok,
%{bank: %{city: "Hjørring", logo: "", name: "Jyske Bank", phone: "+4589893300",
url: "www.jyskebank.dk"}, brand: "Visa/Dankort",
country: %{alpha2: "DK", latitude: 56, longitude: 10, name: "Denmark",
numeric: "208"}, number: %{length: 16, prefix: "45717360"}, prepaid: false,
scheme: "VISA", type: "DEBIT"}}


BankCardInfo.get! "45717360"

%{bank: %{city: "Hjørring", logo: "", name: "Jyske Bank", phone: "+4589893300",
url: "www.jyskebank.dk"}, brand: "Visa/Dankort",
country: %{alpha2: "DK", latitude: 56, longitude: 10, name: "Denmark",
numeric: "208"}, number: %{length: 16, prefix: "45717360"}, prepaid: false,
scheme: "VISA", type: "DEBIT"}

Documentation can be generated with ExDoc and published on HexDocs. The docs can be found at https://hexdocs.pm/bank_card_info.

About

Get brand, card type and country by first 6 digits of a bank card.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages