lib/active_merchant/billing/credit_card_methods.rb
# Returns true if it validates. Optionally, you can pass a card brand as an argument and
# make sure it is of the correct brand.
#
# References:
# - http://perl.about.com/compute/perl/library/nosearch/P073000.htm
# - http://www.beachnet.com/~hstiles/cardtype.html
Returns true if it validates. Optionally, you can pass a card brand as an argument and
make sure it is of the correct brand.


Returns true if it validates . Optionally you can pass a card brand as an argument and make sure it is of the correct brand .
def valid_by_algorithm?(brand, numbers) 
          case brand
          when 'naranja'
            valid_naranja_algo?(numbers)
          when 'creditel'
            valid_creditel_algo?(numbers)
          when 'alia', 'confiable', 'maestro_no_luhn'
            true
          else
            valid_luhn?(numbers)
          end
        end
def valid_by_algorithm? ( brand , numbers ) case brand when 'naranja' valid_naranja_algo? ( numbers ) when 'creditel' valid_creditel_algo? ( numbers ) when 'alia' , 'confiable' , 'maestro_no_luhn' true else valid_luhn? ( numbers ) end end
Returns true if it validates.
Returns true if it validates .
#:nodoc:
brand
<not_specific>
numbers
<not_specific>