Method: ActiveMerchant::Billing::CredoraxGateway#authorize

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

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



163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
# File 'lib/active_merchant/billing/gateways/credorax.rb', line 163

def authorize(amount, payment_method, options = {})
  post = {}
  add_invoice(post, amount, options)
  add_payment_method(post, payment_method, options)
  add_customer_data(post, options)
  add_email(post, options)
  add_3d_secure(post, options)
  add_3ds_2_optional_fields(post, options)
  add_echo(post, options)
  add_submerchant_id(post, options)
  add_stored_credential(post, options)
  (post, options)
  add_processor(post, options)
  add_authorization_details(post, options)
  add_crypto_currency_type(post, options)

  if options[:aft]
    add_recipient(post, options)
    add_sender(post, options)
  end

  commit(:authorize, post)
end