Class: ActiveMerchant::Billing::ArgusGateway
- Inherits:
-
Gateway
- Object
- Gateway
- ActiveMerchant::Billing::ArgusGateway
- Includes:
- Empty
- Defined in:
- lib/active_merchant/billing/gateways/argus.rb
Overview
Argus Payments is now Inovio Payments. For more information visit Inovio
Written by Piers Chambers (Varyonic.com)
Constant Summary collapse
- STANDARD_ERROR_CODE_MAPPING =
{ '500' => STANDARD_ERROR_CODE[:processing_error], # Merchant account could not be validated '555' => STANDARD_ERROR_CODE[:call_issuer], '600' => STANDARD_ERROR_CODE[:card_declined], '620' => STANDARD_ERROR_CODE[:invalid_cvc], '621' => STANDARD_ERROR_CODE[:incorrect_cvc], '623' => STANDARD_ERROR_CODE[:incorrect_address], '624' => STANDARD_ERROR_CODE[:expired_card], '630' => STANDARD_ERROR_CODE[:invalid_number], '610' => STANDARD_ERROR_CODE[:pickup_card], }
Instance Method Summary collapse
- #authorize(money, payment, options = {}) ⇒ Object
- #capture(money, authorization, options = {}) ⇒ Object
-
#initialize(options = {}) ⇒ ArgusGateway
constructor
A new instance of ArgusGateway.
- #purchase(money, payment, options = {}) ⇒ Object
- #refund(money, authorization, options = {}) ⇒ Object
- #scrub(transcript) ⇒ Object
- #supports_scrubbing? ⇒ Boolean
- #verify(credit_card, options = {}) ⇒ Object
- #void(authorization, options = {}) ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ ArgusGateway
Returns a new instance of ArgusGateway.
32 33 34 35 |
# File 'lib/active_merchant/billing/gateways/argus.rb', line 32 def initialize(={}) requires!(, :site_id, :req_username, :req_password) super end |
Instance Method Details
#authorize(money, payment, options = {}) ⇒ Object
49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/active_merchant/billing/gateways/argus.rb', line 49 def (money, payment, ={}) post = PostData.new add_invoice(post, money, ) add_payment(post, payment) add_address(post, payment, ) add_customer_data(post, ) add_3ds_auth(post, ) (post, ) commit('CCAUTHORIZE', post) end |
#capture(money, authorization, options = {}) ⇒ Object
61 62 63 64 65 66 |
# File 'lib/active_merchant/billing/gateways/argus.rb', line 61 def capture(money, , ={}) post = PostData.new post[:li_value_1] = amount(money) post[:request_ref_po_id] = commit('CCCAPTURE', post) end |
#purchase(money, payment, options = {}) ⇒ Object
37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/active_merchant/billing/gateways/argus.rb', line 37 def purchase(money, payment, ={}) post = PostData.new add_invoice(post, money, ) add_payment(post, payment) add_address(post, payment, ) add_customer_data(post, ) add_3ds_auth(post, ) (post, ) commit('CCAUTHCAP', post) end |
#refund(money, authorization, options = {}) ⇒ Object
68 69 70 71 72 73 |
# File 'lib/active_merchant/billing/gateways/argus.rb', line 68 def refund(money, , ={}) post = PostData.new post[:li_value_1] = amount(money) post[:request_ref_po_id] = commit('CCCREDIT', post) end |
#scrub(transcript) ⇒ Object
92 93 94 95 96 |
# File 'lib/active_merchant/billing/gateways/argus.rb', line 92 def scrub(transcript) transcript.gsub(%r((&?pmt_numb=)[^&]*)i, '\1[FILTERED]'). gsub(%r((&?pmt_key=)[^&]*)i, '\1[FILTERED]'). gsub(%r((&?req_password=)[^&]*)i, '\1[FILTERED]') end |
#supports_scrubbing? ⇒ Boolean
88 89 90 |
# File 'lib/active_merchant/billing/gateways/argus.rb', line 88 def supports_scrubbing? true end |
#verify(credit_card, options = {}) ⇒ Object
81 82 83 84 85 86 |
# File 'lib/active_merchant/billing/gateways/argus.rb', line 81 def verify(credit_card, ={}) MultiResponse.run(:use_first_response) do |r| r.process { (100, credit_card, ) } r.process(:ignore_result) { void(r., ) } end end |
#void(authorization, options = {}) ⇒ Object
75 76 77 78 79 |
# File 'lib/active_merchant/billing/gateways/argus.rb', line 75 def void(, ={}) post = PostData.new post[:request_ref_po_id] = commit('CCREVERSE', post) end |