CC_issuer
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? # => VisaWhere, 4444 4444 4444 4444 is to be replaced by your Card Number
Even works like this...
require 'cc_issuer'
'4444444444444444'.cci? # => Visarequire 'cc_issuer'
'4444-4444-4444-4444'.cci? # => VisaWhere, 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? # => truerequire 'cc_issuer'
'4444-4444-4444-4444'.maestro? # => falseWhere, 4444-4444-4444-4444 is to be replaced by your Card Number
License
The gem is available as open source under the terms of the MIT License.