Method: ActiveMerchant::Billing::PlugnpayGateway#purchase

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

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



108
109
110
111
112
113
114
115
116
117
118
119
# File 'lib/active_merchant/billing/gateways/plugnpay.rb', line 108

def purchase(money, creditcard, options = {})
  post = PlugnpayPostData.new
  
  add_amount(post, money, options)
  add_creditcard(post, creditcard)
  add_addresses(post, options)
  add_invoice_data(post, options)
  add_customer_data(post, options)
   
  post[:authtype] = 'authpostauth'
  commit(:authorization, post)
end