Class: ActiveMerchant::Billing::VancoGateway
- Includes:
- Empty
- Defined in:
- lib/active_merchant/billing/gateways/vanco.rb
Constant Summary
Constants inherited from Gateway
Gateway::CREDIT_DEPRECATION_MESSAGE, Gateway::CURRENCIES_WITHOUT_FRACTIONS, Gateway::DEBIT_CARDS, Gateway::RECURRING_DEPRECATION_MESSAGE, Gateway::STANDARD_ERROR_CODE
Instance Attribute Summary
Attributes inherited from Gateway
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ VancoGateway
constructor
A new instance of VancoGateway.
- #purchase(money, payment_method, options = {}) ⇒ Object
- #refund(money, authorization, options = {}) ⇒ Object
- #scrub(transcript) ⇒ Object
- #supports_scrubbing? ⇒ Boolean
Methods inherited from Gateway
#card_brand, card_brand, #generate_unique_id, inherited, non_fractional_currency?, #supported_countries, supported_countries, supported_countries=, supports?, #supports_network_tokenization?, #test?
Methods included from CreditCardFormatting
Methods included from PostsData
included, #raw_ssl_request, #ssl_get, #ssl_post, #ssl_request
Constructor Details
#initialize(options = {}) ⇒ VancoGateway
Returns a new instance of VancoGateway.
18 19 20 21 |
# File 'lib/active_merchant/billing/gateways/vanco.rb', line 18 def initialize(={}) requires!(, :user_id, :password, :client_id) super end |
Instance Method Details
#purchase(money, payment_method, options = {}) ⇒ Object
23 24 25 26 27 28 |
# File 'lib/active_merchant/billing/gateways/vanco.rb', line 23 def purchase(money, payment_method, ={}) MultiResponse.run do |r| r.process { commit(login_request) } r.process { commit(purchase_request(money, payment_method, r.params["response_sessionid"], )) } end end |
#refund(money, authorization, options = {}) ⇒ Object
30 31 32 33 34 35 |
# File 'lib/active_merchant/billing/gateways/vanco.rb', line 30 def refund(money, , ={}) MultiResponse.run do |r| r.process { commit(login_request) } r.process { commit(refund_request(money, , r.params["response_sessionid"])) } end end |
#scrub(transcript) ⇒ Object
41 42 43 44 45 46 |
# File 'lib/active_merchant/billing/gateways/vanco.rb', line 41 def scrub(transcript) transcript. gsub(%r((<Password>).+(</Password>))i, '\1[FILTERED]\2'). gsub(%r((<CardCVV2>).+(</CardCVV2>))i, '\1[FILTERED]\2'). gsub(%r((<AccountNumber>).+(</AccountNumber>))i, '\1[FILTERED]\2') end |
#supports_scrubbing? ⇒ Boolean
37 38 39 |
# File 'lib/active_merchant/billing/gateways/vanco.rb', line 37 def supports_scrubbing? true end |