Class: ActiveMerchant::Billing::PayscoutGateway
- Defined in:
- lib/active_merchant/billing/gateways/payscout.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, creditcard, options = {}) ⇒ Object
- #capture(money, authorization, options = {}) ⇒ Object
-
#initialize(options = {}) ⇒ PayscoutGateway
constructor
A new instance of PayscoutGateway.
- #purchase(money, creditcard, 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 = {}) ⇒ PayscoutGateway
Returns a new instance of PayscoutGateway.
12 13 14 15 |
# File 'lib/active_merchant/billing/gateways/payscout.rb', line 12 def initialize( = {}) requires!(, :username, :password) super end |
Instance Method Details
#authorize(money, creditcard, options = {}) ⇒ Object
17 18 19 20 21 22 23 24 25 |
# File 'lib/active_merchant/billing/gateways/payscout.rb', line 17 def (money, creditcard, = {}) post = {} add_invoice(post, ) add_creditcard(post, creditcard) add_currency(post, money, ) add_address(post, ) commit('auth', money, post) end |
#capture(money, authorization, options = {}) ⇒ Object
37 38 39 40 41 42 |
# File 'lib/active_merchant/billing/gateways/payscout.rb', line 37 def capture(money, , = {}) post = {} post[:transactionid] = 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/payscout.rb', line 27 def purchase(money, creditcard, = {}) post = {} add_invoice(post, ) add_creditcard(post, creditcard) add_currency(post, money, ) add_address(post, ) commit('sale', money, post) end |
#refund(money, authorization, options = {}) ⇒ Object
44 45 46 47 48 49 |
# File 'lib/active_merchant/billing/gateways/payscout.rb', line 44 def refund(money, , = {}) post = {} post[:transactionid] = commit('refund', money, post) end |
#void(authorization, options = {}) ⇒ Object
51 52 53 54 55 56 |
# File 'lib/active_merchant/billing/gateways/payscout.rb', line 51 def void(, = {}) post = {} post[:transactionid] = commit('void', nil, post) end |