Class: ActiveMerchant::Billing::BpointGateway
- Inherits:
-
Gateway
- Object
- Gateway
- ActiveMerchant::Billing::BpointGateway
- Defined in:
- lib/activemerchant/billing/gateways/bpoint.rb
Constant Summary collapse
- LIVE_URL =
'https://www.bpoint.com.au/evolve/service.asmx'
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ BpointGateway
constructor
A new instance of BpointGateway.
- #purchase(money, creditcard, options = {}) ⇒ Object
- #store(credit_card, options = {}) ⇒ Object
- #test? ⇒ Boolean
- #unstore(token, options = {}) ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ BpointGateway
Returns a new instance of BpointGateway.
13 14 15 16 17 |
# File 'lib/activemerchant/billing/gateways/bpoint.rb', line 13 def initialize( = {}) requires!(, :login, :password, :merchant_number) @options = super end |
Instance Method Details
#purchase(money, creditcard, options = {}) ⇒ Object
19 20 21 22 23 24 25 |
# File 'lib/activemerchant/billing/gateways/bpoint.rb', line 19 def purchase(money, creditcard, = {}) post = {} add_invoice(post, ) add_creditcard(post, creditcard, ) commit('ProcessPayment', money, post) end |
#store(credit_card, options = {}) ⇒ Object
27 28 29 30 31 32 |
# File 'lib/activemerchant/billing/gateways/bpoint.rb', line 27 def store(credit_card, = {}) post = {} add_creditcard(post, credit_card, ) commit('AddToken', nil, post) end |
#test? ⇒ Boolean
40 41 42 |
# File 'lib/activemerchant/billing/gateways/bpoint.rb', line 40 def test? @options[:test] || super end |
#unstore(token, options = {}) ⇒ Object
34 35 36 37 38 |
# File 'lib/activemerchant/billing/gateways/bpoint.rb', line 34 def unstore(token, = {}) post = { :token => token } commit('DeleteToken', nil, post) end |