Method: ActiveMerchant::Billing::Response#initialize
- Defined in:
- lib/active_merchant/billing/response.rb
#initialize(success, message, params = {}, options = {}) ⇒ Response
Returns a new instance of Response.
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/active_merchant/billing/response.rb', line 25 def initialize(success, , params = {}, = {}) @success, @message, @params = success, , params.stringify_keys @test = [:test] || false @authorization = [:authorization] @fraud_review = [:fraud_review] @error_code = [:error_code] @emv_authorization = [:emv_authorization] @network_transaction_id = [:network_transaction_id] @pending = [:pending] || false @avs_result = if [:avs_result].kind_of?(AVSResult) [:avs_result].to_hash else AVSResult.new([:avs_result]).to_hash end @cvv_result = if [:cvv_result].kind_of?(CVVResult) [:cvv_result].to_hash else CVVResult.new([:cvv_result]).to_hash end end |