Sha256: 876a41c08fdc5389f27a6ea5c8c7f95e677ff2252eb94d479533817819771d37

Contents?: true

Size: 834 Bytes

Versions: 120

Compression:

Stored size: 834 Bytes

Contents

module ActiveMerchant #:nodoc:
  module Billing #:nodoc:
  
    class Error < ActiveMerchantError #:nodoc:
    end
  
    class Response
      attr_reader :params, :message, :test, :authorization, :avs_result, :cvv_result
      
      def success?
        @success
      end

      def test?
        @test
      end
      
      def fraud_review?
        @fraud_review
      end
      
      def initialize(success, message, params = {}, options = {})
        @success, @message, @params = success, message, params.stringify_keys
        @test = options[:test] || false        
        @authorization = options[:authorization]
        @fraud_review = options[:fraud_review]
        @avs_result = AVSResult.new(options[:avs_result]).to_hash
        @cvv_result = CVVResult.new(options[:cvv_result]).to_hash
      end
    end
  end
end

Version data entries

120 entries across 120 versions & 32 rubygems

Version Path
tlconnor-activemerchant-1.23.0 lib/active_merchant/billing/response.rb
activemerchant-1.23.0 lib/active_merchant/billing/response.rb
activemerchant-1.22.0 lib/active_merchant/billing/response.rb
yetanothernguyen-activemerchant-1.21.0 lib/active_merchant/billing/response.rb
activemerchant-1.21.0 lib/active_merchant/billing/response.rb
tlconnor-activemerchant-1.20.4 lib/active_merchant/billing/response.rb
activemerchant-1.20.4 lib/active_merchant/billing/response.rb
activemerchant-1.20.3 lib/active_merchant/billing/response.rb
activemerchant-1.20.2 lib/active_merchant/billing/response.rb
activemerchant-1.20.1 lib/active_merchant/billing/response.rb
activemerchant-1.20.0 lib/active_merchant/billing/response.rb
vibedeck-activemerchant-1.18.2 lib/active_merchant/billing/response.rb
activemerchant-1.18.1 lib/active_merchant/billing/response.rb
fishman-activemerchant-1.18.0 lib/active_merchant/billing/response.rb
activemerchant-1.18.0 lib/active_merchant/billing/response.rb
activemerchant-1.17.0 lib/active_merchant/billing/response.rb
yetanothernguyen-activemerchant-1.16.0 lib/active_merchant/billing/response.rb
activemerchant-1.16.0 lib/active_merchant/billing/response.rb
gonow-activemerchant-1.15.0 lib/active_merchant/billing/response.rb
bitfluent-activemerchant-1.15.1 lib/active_merchant/billing/response.rb