Class/Module Index [+]

Quicksearch

ActiveMerchant::Billing::CreditCardMethods

Convenience methods that can be included into a custom Credit Card object, such as an ActiveRecord based Credit Card object.

Constants

CARD_COMPANIES

Public Class Methods

included(base) click to toggle source
# File lib/active_merchant/billing/credit_card_methods.rb, line 20
def self.included(base)
  base.extend(ClassMethods)
end

Public Instance Methods

valid_expiry_year?(year) click to toggle source
# File lib/active_merchant/billing/credit_card_methods.rb, line 28
def valid_expiry_year?(year)
  (Time.now.year..Time.now.year + 20).include?(year.to_i)
end
valid_issue_number?(number) click to toggle source
# File lib/active_merchant/billing/credit_card_methods.rb, line 36
def valid_issue_number?(number)
  number.to_s =~ /^\d{1,2}$/
end
valid_month?(month) click to toggle source
# File lib/active_merchant/billing/credit_card_methods.rb, line 24
def valid_month?(month)
  (1..12).include?(month.to_i)
end
valid_start_year?(year) click to toggle source
# File lib/active_merchant/billing/credit_card_methods.rb, line 32
def valid_start_year?(year)
  year.to_s =~ /^\d{4}$/ && year.to_i > 1987
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.