Class: ActiveMerchant::Billing::UsaEpayGateway
- Defined in:
- lib/active_merchant/billing/gateways/usa_epay.rb
Constant Summary collapse
- URL =
'https://www.usaepay.com/gate.php'
- TRANSACTIONS =
{ :authorization => 'authonly', :purchase => 'sale', :capture => 'capture' }
Constants inherited from Gateway
Gateway::CREDIT_DEPRECATION_MESSAGE, Gateway::CURRENCIES_WITHOUT_FRACTIONS, Gateway::DEBIT_CARDS
Instance Attribute Summary
Attributes inherited from Gateway
Instance Method Summary collapse
- #authorize(money, credit_card, options = {}) ⇒ Object
- #capture(money, authorization, options = {}) ⇒ Object
-
#initialize(options = {}) ⇒ UsaEpayGateway
constructor
A new instance of UsaEpayGateway.
- #purchase(money, credit_card, options = {}) ⇒ Object
Methods inherited from Gateway
#card_brand, card_brand, inherited, supports?, #test?
Methods included from CreditCardFormatting
Constructor Details
#initialize(options = {}) ⇒ UsaEpayGateway
Returns a new instance of UsaEpayGateway.
18 19 20 21 22 |
# File 'lib/active_merchant/billing/gateways/usa_epay.rb', line 18 def initialize( = {}) requires!(, :login) @options = super end |
Instance Method Details
#authorize(money, credit_card, options = {}) ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/active_merchant/billing/gateways/usa_epay.rb', line 24 def (money, credit_card, = {}) post = {} add_amount(post, money) add_invoice(post, ) add_credit_card(post, credit_card) add_address(post, credit_card, ) add_customer_data(post, ) commit(:authorization, post) end |
#capture(money, authorization, options = {}) ⇒ Object
48 49 50 51 52 53 54 55 |
# File 'lib/active_merchant/billing/gateways/usa_epay.rb', line 48 def capture(money, , = {}) post = { :refNum => } add_amount(post, money) commit(:capture, post) end |
#purchase(money, credit_card, options = {}) ⇒ Object
36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/active_merchant/billing/gateways/usa_epay.rb', line 36 def purchase(money, credit_card, = {}) post = {} add_amount(post, money) add_invoice(post, ) add_credit_card(post, credit_card) add_address(post, credit_card, ) add_customer_data(post, ) commit(:purchase, post) end |