Class: ActiveMerchant::Billing::BanwireGateway

Inherits:
Gateway
  • Object
show all
Defined in:
lib/active_merchant/billing/gateways/banwire.rb

Constant Summary collapse

URL =
'https://banwire.com/api.pago_pro'

Constants inherited from Gateway

Gateway::CREDIT_DEPRECATION_MESSAGE, Gateway::CURRENCIES_WITHOUT_FRACTIONS, Gateway::DEBIT_CARDS

Instance Attribute Summary

Attributes inherited from Gateway

#options

Instance Method Summary collapse

Methods inherited from Gateway

card_brand, inherited, supports?, #test?

Methods included from CreditCardFormatting

#format

Constructor Details

#initialize(options = {}) ⇒ BanwireGateway

Returns a new instance of BanwireGateway.



11
12
13
14
# File 'lib/active_merchant/billing/gateways/banwire.rb', line 11

def initialize(options = {})
  requires!(options, :login)
  super
end

Instance Method Details

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



16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/active_merchant/billing/gateways/banwire.rb', line 16

def purchase(money, creditcard, options = {})
  post = {}
  add_response_type(post)
  add_customer_data(post, options)
  add_order_data(post, options)
  add_creditcard(post, creditcard)
  add_address(post, creditcard, options)
  add_customer_data(post, options)
  add_amount(post, money, options)

  commit(money, post)
end