Method: ActiveMerchant::Billing::PaymentezGateway#authorize

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

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



73
74
75
76
77
78
79
80
81
82
83
84
# File 'lib/active_merchant/billing/gateways/paymentez.rb', line 73

def authorize(money, payment, options = {})
  return purchase(money, payment, options) if options[:otp_flow]

  post = {}

  add_invoice(post, money, options)
  add_payment(post, payment)
  add_customer_data(post, options)
  add_extra_params(post, options)

  commit_transaction('authorize', post)
end