Method: ActiveMerchant::Billing::MastercardGateway#authorize

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

#authorize(amount, payment_method, options = {}) ⇒ Object



27
28
29
30
31
32
33
34
35
36
# File 'lib/active_merchant/billing/gateways/mastercard.rb', line 27

def authorize(amount, payment_method, options = {})
  post = new_post
  add_invoice(post, amount, options)
  add_reference(post, *new_authorization(options))
  add_payment_method(post, payment_method)
  add_customer_data(post, payment_method, options)
  add_3dsecure_id(post, options)

  commit('authorize', post)
end