lib/active_merchant/billing/gateways/litle.rb
def validate_card_token #:nodoc:
          if token.to_s.length < 12 || token.to_s.match(/\A\d+\Z/).nil?
            errors.add :token, "is not a valid card token"
          end
        end
# Litle XML Reference Guide 1.8.2
#
# The length of the original card number is reflected in the token, so a
# submitted 16-digit number results in a 16-digit token. Also, all tokens
# use only numeric characters, so you do not have to change your
# systems to accept alpha-numeric characters.
#
# The credit card token numbers themselves have two parts.
# The last four digits match the last four digits of the card number.
# The remaining digits (length can vary based upon original card number
# length) are a randomly generated.
Litle XML Reference Guide 1.8.2
The length of the original card number is reflected in the token, so a
submitted 16-digit number results in a 16-digit token. Also, all tokens
use only numeric characters, so you do not have to change your
systems to accept alpha-numeric characters.

The credit card token numbers themselves have two parts.
The last four digits match the last four digits of the card number.
The remaining digits (length can vary based upon original card number
length) are a randomly generated.
Litle XML Reference Guide 1 . 8 . 2 The length of the original card number is reflected in the token so a submitted 16 - digit number results in a 16 - digit token . Also all tokens use only numeric characters so you do not have to change your systems to accept alpha - numeric characters . The credit card token numbers themselves have two parts . The last four digits match the last four digits of the card number . The remaining digits ( length can vary based upon original card number length ) are a randomly generated .
def validate_card_token 
          if token.to_s.length < 12 || token.to_s.match(/\A\d+\Z/).nil?
            errors.add :token, "is not a valid card token"
          end
        end
def validate_card_token if token . to_s . length < 12 || token . to_s . match ( / \A \d + \Z / ) . nil? errors . add :token , "is not a valid card token" end end
Litle XML Reference Guide 1.8.2
The length of the original card number is reflected in the token, so a
submitted 16-digit number results in a 16-digit token.
Litle XML Reference Guide 1 . 8 . 2 The length of the original card number is reflected in the token so a submitted 16 - digit number results in a 16 - digit token .
#:nodoc: