Method: ActiveMerchant::Billing::AdyenGateway#purchase

Defined in:
lib/active_merchant/billing/gateways/adyen.rb

#purchase(money, payment, options = {}) ⇒ Object



44
45
46
47
48
49
50
51
52
53
# File 'lib/active_merchant/billing/gateways/adyen.rb', line 44

def purchase(money, payment, options = {})
  if options[:execute_threed] || options[:threed_dynamic]
    authorize(money, payment, options)
  else
    MultiResponse.run do |r|
      r.process { authorize(money, payment, options) }
      r.process { capture(money, r.authorization, capture_options(options)) }
    end
  end
end