Method: ActiveMerchant::Billing::MultiResponse#process

Defined in:
lib/active_merchant/billing/response.rb

#process(ignore_result = false) ⇒ Object



61
62
63
64
65
66
67
68
69
70
71
72
73
74
# File 'lib/active_merchant/billing/response.rb', line 61

def process(ignore_result = false)
  return unless success?

  response = yield
  self << response

  unless ignore_result
    if @use_first_response && response.success?
      @primary_response ||= response
    else
      @primary_response = response
    end
  end
end