Module: ActiveMerchant::Billing::CreditCardMethods::ClassMethods

Module | ActiveMerchant::Billing::CreditCardMethods::ClassMethods
In: | lib/active_merchant/billing/credit_card_methods.rb

### Methods

card_companies last_digits mask matching_type? type? valid_number?

### Public Instance methods

card_companies()

Regular expressions for the known card companies.

References:

- en.wikipedia.org/wiki/Credit_card_number
- www.barclaycardbusiness.co.uk/information_zone/processing/bin_rules.html

last_digits(number)
mask(number)
matching_type?(number, type)

Checks to see if the calculated type matches the specified type

type?(number)

Returns a string containing the type of card from the list of known information below. Need to check the cards in a particular order, as there is some overlap of the allowable ranges

valid_number?(number)

Returns true if it validates. Optionally, you can pass a card type as an argument and make sure it is of the correct type.

References:

- perl.about.com/compute/perl/library/nosearch/P073000.htm
- www.beachnet.com/~hstiles/cardtype.html

[Validate]