Sha256: 543d865c91696b6c540dc77669d586df43f5019fed1a09f9342b693fd070f6a2

Contents?: true

Size: 982 Bytes

Versions: 35

Compression:

Stored size: 982 Bytes

Contents

module ActiveMerchant
  module Billing
    # Result of the Card Verification Value check
    # http://www.bbbonline.org/eExport/doc/MerchantGuide_cvv2.pdf
    # Check additional codes from cybersource website
    class CVVResult
      MESSAGES = {
        'D'  =>  'CVV check flagged transaction as suspicious',
        'I'  =>  'CVV failed data validation check',
        'M'  =>  'CVV matches',
        'N'  =>  'CVV does not match',
        'P'  =>  'CVV not processed',
        'S'  =>  'CVV should have been present',
        'U'  =>  'CVV request unable to be processed by issuer',
        'X'  =>  'CVV check not supported for card'
      }

      def self.messages
        MESSAGES
      end

      attr_reader :code, :message

      def initialize(code)
        @code = (code.blank? ? nil : code.upcase)
        @message = MESSAGES[@code]
      end

      def to_hash
        {
          'code' => code,
          'message' => message
        }
      end
    end
  end
end

Version data entries

35 entries across 35 versions & 3 rubygems

Version Path
swiss-activemerchant-1.0.6 lib/active_merchant/billing/cvv_result.rb
swiss-activemerchant-1.0.5 lib/active_merchant/billing/cvv_result.rb
swiss-activemerchant-1.0.4 lib/active_merchant/billing/cvv_result.rb
activemerchant-1.137.0 lib/active_merchant/billing/cvv_result.rb
swiss-activemerchant-1.0.2 lib/active_merchant/billing/cvv_result.rb
swiss-activemerchant-1.0.1 lib/active_merchant/billing/cvv_result.rb
activemerchant-1.133.0 lib/active_merchant/billing/cvv_result.rb
activemerchant-1.131.0 lib/active_merchant/billing/cvv_result.rb
activemerchant-1.130.0 lib/active_merchant/billing/cvv_result.rb
activemerchant-1.129.0 lib/active_merchant/billing/cvv_result.rb
activemerchant-1.126.0 lib/active_merchant/billing/cvv_result.rb
activemerchant-1.125.0 lib/active_merchant/billing/cvv_result.rb
archetype2142_activemerchant-1.124.0 lib/active_merchant/billing/cvv_result.rb
activemerchant-1.124.0 lib/active_merchant/billing/cvv_result.rb
activemerchant-1.123.0 lib/active_merchant/billing/cvv_result.rb
activemerchant-1.121.0 lib/active_merchant/billing/cvv_result.rb
activemerchant-1.120.0 lib/active_merchant/billing/cvv_result.rb
activemerchant-1.119.0 lib/active_merchant/billing/cvv_result.rb
activemerchant-1.118.0 lib/active_merchant/billing/cvv_result.rb
activemerchant-1.117.0 lib/active_merchant/billing/cvv_result.rb