Class: ActiveMerchant::Billing::UsaEpayGateway
- Defined in:
- lib/active_merchant/billing/gateways/usa_epay.rb
Constant Summary collapse
- GATEWAY_URL =
'https://www.usaepay.com/gate.php'
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#response ⇒ Object
readonly
Returns the value of attribute response.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Class Method Summary collapse
Instance Method Summary collapse
- #authorize(money, creditcard, options = {}) ⇒ Object
- #capture(money, authorization, options = {}) ⇒ Object
-
#initialize(options = {}) ⇒ UsaEpayGateway
constructor
A new instance of UsaEpayGateway.
- #purchase(money, creditcard, options = {}) ⇒ Object
Methods inherited from Gateway
Methods included from RequiresParameters
Methods included from PostsData
Constructor Details
#initialize(options = {}) ⇒ UsaEpayGateway
Returns a new instance of UsaEpayGateway.
11 12 13 14 15 |
# File 'lib/active_merchant/billing/gateways/usa_epay.rb', line 11 def initialize( = {}) requires!(, :login) @options = super end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
9 10 11 |
# File 'lib/active_merchant/billing/gateways/usa_epay.rb', line 9 def @options end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
8 9 10 |
# File 'lib/active_merchant/billing/gateways/usa_epay.rb', line 8 def response @response end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
7 8 9 |
# File 'lib/active_merchant/billing/gateways/usa_epay.rb', line 7 def url @url end |
Class Method Details
.supported_cardtypes ⇒ Object
42 43 44 |
# File 'lib/active_merchant/billing/gateways/usa_epay.rb', line 42 def self.supported_cardtypes [:visa, :master, :american_express] end |
Instance Method Details
#authorize(money, creditcard, options = {}) ⇒ Object
17 18 19 20 21 22 23 24 25 |
# File 'lib/active_merchant/billing/gateways/usa_epay.rb', line 17 def (money, creditcard, = {}) post = {} add_invoice(post, ) add_creditcard(post, creditcard) add_address(post, creditcard, ) add_customer_data(post, ) commit('authonly', money, post) end |
#capture(money, authorization, options = {}) ⇒ Object
37 38 39 40 |
# File 'lib/active_merchant/billing/gateways/usa_epay.rb', line 37 def capture(money, , = {}) post = {:refNum => } commit('capture', money, post) end |
#purchase(money, creditcard, options = {}) ⇒ Object
27 28 29 30 31 32 33 34 35 |
# File 'lib/active_merchant/billing/gateways/usa_epay.rb', line 27 def purchase(money, creditcard, = {}) post = {} add_invoice(post, ) add_creditcard(post, creditcard) add_address(post, creditcard, ) add_customer_data(post, ) commit('sale', money, post) end |