Method: ActiveMerchant::Billing::WorldpayGateway#verify

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

#verify(payment_method, options = {}) ⇒ Object



121
122
123
124
125
126
127
# File 'lib/active_merchant/billing/gateways/worldpay.rb', line 121

def verify(payment_method, options = {})
  amount = (eligible_for_0_auth?(payment_method, options) ? 0 : 100)
  MultiResponse.run(:use_first_response) do |r|
    r.process { authorize(amount, payment_method, options) }
    r.process(:ignore_result) { void(r.authorization, options.merge(authorization_validated: true)) }
  end
end