Method: ActiveMerchant::Billing::MerchantOneGateway#purchase

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

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



36
37
38
39
40
41
42
43
44
# File 'lib/active_merchant/billing/gateways/merchant_one.rb', line 36

def purchase(money, creditcard, options = {})
  post = {}
  add_customer_data(post, options)
  add_creditcard(post, creditcard)
  add_address(post, creditcard, options)
  add_customer_data(post, options)
  add_amount(post, money, options)
  commit('sale', money, post)
end