Skip to content

manojnaidu619/cc_issuer

Repository files navigation

CC_issuer

Build Status Coverage Status Gem Version Gem

PRs Welcome Say Thanks!

A gem to find out issuer of the credit card just by entering the Card Number. Currently supports..

               

How To Install?

Add this line to your application's Gemfile:

gem 'cc_issuer'

And then execute:

$ bundle install

OR install it yourself as:

$ gem install cc_issuer

Usage

require 'cc_issuer'
'4444 4444 4444 4444'.cci?   # => Visa

Where, 4444 4444 4444 4444 is to be replaced by your Card Number

Even works like this...
require 'cc_issuer'
'4444444444444444'.cci?   # => Visa
require 'cc_issuer'
'4444-4444-4444-4444'.cci?   # => Visa

Where, cci? refers to Credit Card Issuer?

These are some of the supported plugins

Card Issuer Key Value
Mastercard :mastercard?
Visa :visa?
Discover :discover?
American Express :amex?
Japan credit bureau :jcb?
Maestro :maestro?
DC Carte Blanche :dccb?
DC International :dci?
Enroute :enroute?
Examples :
require 'cc_issuer'
'4444-4444-4444-4444'.visa?   # => true
require 'cc_issuer'
'4444-4444-4444-4444'.maestro?   # => false

Where, 4444-4444-4444-4444 is to be replaced by your Card Number

PRs Welcome

License

The gem is available as open source under the terms of the MIT License.