Sha256: d1255bb9780fc998892820f24606b62a15efbfc22768a7d5faec47afd92933c2

Contents?: true

Size: 950 Bytes

Versions: 177

Compression:

Stored size: 950 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'  =>  'Suspicious transaction',
        'I'  =>  'Failed data validation check',
        'M'  =>  'Match',
        'N'  =>  'No Match',
        'P'  =>  'Not Processed',
        'S'  =>  'Should have been present',
        'U'  =>  'Issuer unable to process request',
        'X'  =>  'Card does not support verification'
      }
      
      def self.messages
        MESSAGES
      end
      
      attr_reader :code, :message
      
      def initialize(code)
        @code = code.upcase unless code.blank?
        @message = MESSAGES[@code]
      end
      
      def to_hash
        {
          'code' => code,
          'message' => message
        }
      end
    end
  end
end

Version data entries

177 entries across 177 versions & 35 rubygems

Version Path
tanga_activemerchant-1.38.0.5 lib/active_merchant/billing/cvv_result.rb
tanga_activemerchant-1.38.0.4 lib/active_merchant/billing/cvv_result.rb
tanga_activemerchant-1.38.0.3 lib/active_merchant/billing/cvv_result.rb
tanga_activemerchant-1.38.0.2 lib/active_merchant/billing/cvv_result.rb
tanga_activemerchant-1.38.0.1 lib/active_merchant/billing/cvv_result.rb
tanga_activemerchant-1.38.0 lib/active_merchant/billing/cvv_result.rb
tanga_activemerchant-1.37.0 lib/active_merchant/billing/cvv_result.rb
johnideal-activemerchant-1.4.10 lib/active_merchant/billing/cvv_result.rb
johnideal-activemerchant-1.4.11 lib/active_merchant/billing/cvv_result.rb
johnideal-activemerchant-1.4.4 lib/active_merchant/billing/cvv_result.rb
johnideal-activemerchant-1.4.5 lib/active_merchant/billing/cvv_result.rb
johnideal-activemerchant-1.4.6 lib/active_merchant/billing/cvv_result.rb
johnideal-activemerchant-1.4.7 lib/active_merchant/billing/cvv_result.rb
johnideal-activemerchant-1.4.8 lib/active_merchant/billing/cvv_result.rb
martinstannard-activemerchant-0.1.0 lib/active_merchant/billing/cvv_result.rb
mattbauer-activemerchant-1.4.2 lib/active_merchant/billing/cvv_result.rb
seamusabshere-active_merchant-1.4.2.1 lib/active_merchant/billing/cvv_result.rb
seamusabshere-active_merchant-1.4.2.3 lib/active_merchant/billing/cvv_result.rb
tomriley-active_merchant-1.4.2.3 lib/active_merchant/billing/cvv_result.rb
tomriley-active_merchant-1.4.2.4 lib/active_merchant/billing/cvv_result.rb