Class: ActiveMerchant::Billing::ConveniencePayGateway
- Defined in:
- lib/active_merchant/billing/gateways/convenience_pay.rb
Overview
See the remote test file for example usage.
-
All transactions use dollar values.
Constant Summary collapse
- TEST_URL =
'https://mo.paybill.com/WebServices/v3.6/PaybillService36.asmx'
- LIVE_URL =
'https://www.paybill.com/WebServices/v3.6/PaybillService36.asmx'
Constants inherited from Gateway
Instance Attribute Summary
Attributes inherited from Gateway
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ ConveniencePayGateway
constructor
These are the options that can be used when creating a new Convenience Pay Gateway object.
- #purchase(money, creditcard, options = {}) ⇒ Object
-
#test? ⇒ Boolean
Should run against the test servers or not?.
- #void(identification, options = {}) ⇒ Object
Methods inherited from Gateway
#card_brand, card_brand, inherited, supports?
Methods included from Utils
Methods included from CreditCardFormatting
Methods included from RequiresParameters
Methods included from PostsData
Constructor Details
#initialize(options = {}) ⇒ ConveniencePayGateway
These are the options that can be used when creating a new Convenience Pay Gateway object.
:login => your username
:password => your password
:test => true sets the gateway to test mode
25 26 27 28 29 |
# File 'lib/active_merchant/billing/gateways/convenience_pay.rb', line 25 def initialize( = {}) requires!(, :login, :password, :client_id, :transaction_type) @options = super end |
Instance Method Details
#purchase(money, creditcard, options = {}) ⇒ Object
36 37 38 39 40 |
# File 'lib/active_merchant/billing/gateways/convenience_pay.rb', line 36 def purchase(money, creditcard, = {}) requires!(, :order_id) setup_address_hash() commit('AuthorizeCreditCard', build_purchase_request(money, creditcard, ), ) end |
#test? ⇒ Boolean
Should run against the test servers or not?
32 33 34 |
# File 'lib/active_merchant/billing/gateways/convenience_pay.rb', line 32 def test? @options[:test] || Base.gateway_mode == :test end |
#void(identification, options = {}) ⇒ Object
42 43 44 |
# File 'lib/active_merchant/billing/gateways/convenience_pay.rb', line 42 def void(identification, = {}) commit('VoidPayment', build_void_request(identification, ), ) end |