Class: ActiveMerchant::Billing::SoEasyPayGateway
- Defined in:
- lib/active_merchant/billing/gateways/so_easy_pay.rb
Constant Summary
Constants inherited from Gateway
Gateway::CREDIT_DEPRECATION_MESSAGE, Gateway::RECURRING_DEPRECATION_MESSAGE, Gateway::STANDARD_ERROR_CODE
Instance Attribute Summary
Attributes inherited from Gateway
Instance Method Summary collapse
- #authorize(money, payment_source, options = {}) ⇒ Object
- #capture(money, authorization, options = {}) ⇒ Object
-
#initialize(options = {}) ⇒ SoEasyPayGateway
constructor
A new instance of SoEasyPayGateway.
- #purchase(money, payment_source, options = {}) ⇒ Object
- #refund(money, authorization, options = {}) ⇒ Object
- #void(authorization, options = {}) ⇒ Object
Methods inherited from Gateway
#add_field_to_post_if_present, #add_fields_to_post_if_present, #card_brand, card_brand, #generate_unique_id, inherited, #scrub, #supported_countries, supported_countries, supported_countries=, supports?, #supports_network_tokenization?, #supports_scrubbing?, #test?
Methods included from CreditCardFormatting
#expdate, #format, #strftime_yyyymm
Methods included from PostsData
included, #raw_ssl_request, #ssl_get, #ssl_post, #ssl_request
Constructor Details
#initialize(options = {}) ⇒ SoEasyPayGateway
Returns a new instance of SoEasyPayGateway.
17 18 19 20 |
# File 'lib/active_merchant/billing/gateways/so_easy_pay.rb', line 17 def initialize( = {}) requires!(, :login, :password) super end |
Instance Method Details
#authorize(money, payment_source, options = {}) ⇒ Object
22 23 24 25 26 27 28 |
# File 'lib/active_merchant/billing/gateways/so_easy_pay.rb', line 22 def (money, payment_source, = {}) if payment_source.respond_to?(:number) commit('AuthorizeTransaction', (money, payment_source, ), ) else commit('ReauthorizeTransaction', (money, payment_source, ), ) end end |
#capture(money, authorization, options = {}) ⇒ Object
38 39 40 |
# File 'lib/active_merchant/billing/gateways/so_easy_pay.rb', line 38 def capture(money, , = {}) commit('CaptureTransaction', do_capture(money, , ), ) end |
#purchase(money, payment_source, options = {}) ⇒ Object
30 31 32 33 34 35 36 |
# File 'lib/active_merchant/billing/gateways/so_easy_pay.rb', line 30 def purchase(money, payment_source, = {}) if payment_source.respond_to?(:number) commit('SaleTransaction', do_sale(money, payment_source, ), ) else commit('RebillTransaction', do_rebill(money, payment_source, ), ) end end |
#refund(money, authorization, options = {}) ⇒ Object
42 43 44 |
# File 'lib/active_merchant/billing/gateways/so_easy_pay.rb', line 42 def refund(money, , = {}) commit('RefundTransaction', do_refund(money, , ), ) end |
#void(authorization, options = {}) ⇒ Object
46 47 48 |
# File 'lib/active_merchant/billing/gateways/so_easy_pay.rb', line 46 def void(, = {}) commit('CancelTransaction', do_void(, ), ) end |