Class: PaypalServerSdk::CvvCode

Inherits:
Object
  • Object
show all
Defined in:
lib/paypal_server_sdk/models/cvv_code.rb

Overview

The card verification value code for for Visa, Discover, Mastercard, or American Express.

Constant Summary collapse

CVV_CODE =
[
  # For Visa, Mastercard, Discover, or American Express, error -
  # unrecognized or unknown response.
  CVV_E = 'E'.freeze,

  # For Visa, Mastercard, Discover, or American Express, invalid or null.
  CVV_I = 'I'.freeze,

  # For Visa, Mastercard, Discover, or American Express, the CVV2/CSC
  # matches.
  CVV_M = 'M'.freeze,

  # For Visa, Mastercard, Discover, or American Express, the CVV2/CSC does
  # not match.
  CVV_N = 'N'.freeze,

  # For Visa, Mastercard, Discover, or American Express, it was not
  # processed.
  CVV_P = 'P'.freeze,

  # For Visa, Mastercard, Discover, or American Express, the service is not
  # supported.
  CVV_S = 'S'.freeze,

  # For Visa, Mastercard, Discover, or American Express, unknown - the
  # issuer is not certified.
  CVV_U = 'U'.freeze,

  # For Visa, Mastercard, Discover, or American Express, no response. For
  # Maestro, the service is not available.
  CVV_X = 'X'.freeze,

  # For Visa, Mastercard, Discover, or American Express, error.
  ENUM_ALL_OTHERS = 'All others'.freeze,

  # For Maestro, the CVV2 matched.
  CVV_0 = '0'.freeze,

  # For Maestro, the CVV2 did not match.
  CVV_1 = '1'.freeze,

  # For Maestro, the merchant has not implemented CVV2 code handling.
  CVV_2 = '2'.freeze,

  # For Maestro, the merchant has indicated that CVV2 is not present on
  # card.
  CVV_3 = '3'.freeze,

  # For Maestro, the service is not available.
  CVV_4 = '4'.freeze
].freeze

Class Method Summary collapse

Class Method Details

.validate(value) ⇒ Object



62
63
64
65
66
# File 'lib/paypal_server_sdk/models/cvv_code.rb', line 62

def self.validate(value)
  return false if value.nil?

  true
end