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
johnideal-activemerchant-1.4.10 lib/active_merchant/billing/response.rb
johnideal-activemerchant-1.4.11 lib/active_merchant/billing/response.rb
johnideal-activemerchant-1.4.4 lib/active_merchant/billing/response.rb
johnideal-activemerchant-1.4.5 lib/active_merchant/billing/response.rb
johnideal-activemerchant-1.4.6 lib/active_merchant/billing/response.rb
johnideal-activemerchant-1.4.7 lib/active_merchant/billing/response.rb
johnideal-activemerchant-1.4.8 lib/active_merchant/billing/response.rb
martinstannard-activemerchant-0.1.0 lib/active_merchant/billing/response.rb
mattbauer-activemerchant-1.4.2 lib/active_merchant/billing/response.rb
seamusabshere-active_merchant-1.4.2.1 lib/active_merchant/billing/response.rb
seamusabshere-active_merchant-1.4.2.3 lib/active_merchant/billing/response.rb
tomriley-active_merchant-1.4.2.3 lib/active_merchant/billing/response.rb
yetanothernguyen-activemerchant-1.21.2 lib/active_merchant/billing/response.rb
yetanothernguyen-activemerchant-1.21.1 lib/active_merchant/billing/response.rb
activemerchant-1.25.0 lib/active_merchant/billing/response.rb
jelaniharris-activemerchant-1.24.1 lib/active_merchant/billing/response.rb
activemerchant-1.24.0 lib/active_merchant/billing/response.rb
tlconnor-activemerchant-1.23.3 lib/active_merchant/billing/response.rb
tlconnor-activemerchant-1.23.2 lib/active_merchant/billing/response.rb
tlconnor-activemerchant-1.23.1 lib/active_merchant/billing/response.rb