Class: ActiveMerchant::Billing::QuantumGateway
- Defined in:
- lib/active_merchant/billing/gateways/quantum.rb
Overview
ActiveMerchant Implementation for Quantum Gateway XML Requester Service Based on API Doc from 8/6/2009
Important Notes
-
Support is included for a customer id via the :customer option, invoice number via :invoice option, invoice description via :merchant option and memo via :description option
-
You can force email of receipt with :email_receipt => true
-
You can force email of merchant receipt with :merchant_receipt => true
-
You can exclude CVV with :ignore_cvv => true
-
All transactions use dollar values.
Constant Summary collapse
- LIVE_URL =
'https://secure.quantumgateway.com/cgi/xml_requester.php'
Constants inherited from Gateway
Gateway::CREDIT_DEPRECATION_MESSAGE, Gateway::CURRENCIES_WITHOUT_FRACTIONS, Gateway::DEBIT_CARDS
Instance Attribute Summary
Attributes inherited from Gateway
Instance Method Summary collapse
-
#authorize(money, creditcard, options = {}) ⇒ Object
Request an authorization for an amount from CyberSource.
-
#capture(money, authorization, options = {}) ⇒ Object
Capture an authorization that has previously been requested.
- #credit(money, identification, options = {}) ⇒ Object
-
#initialize(options = {}) ⇒ QuantumGateway
constructor
These are the options that can be used when creating a new Quantum Gateway object.
-
#purchase(money, creditcard, options = {}) ⇒ Object
Purchase is an auth followed by a capture You must supply an order_id in the options hash.
- #refund(money, identification, options = {}) ⇒ Object
-
#test? ⇒ Boolean
Should run against the test servers or not?.
- #void(identification, options = {}) ⇒ Object
Methods inherited from Gateway
#card_brand, card_brand, inherited, supports?
Methods included from Utils
#deprecated, generate_unique_id
Methods included from CreditCardFormatting
Methods included from RequiresParameters
Methods included from PostsData
included, #raw_ssl_request, #ssl_get, #ssl_post, #ssl_request
Constructor Details
#initialize(options = {}) ⇒ QuantumGateway
These are the options that can be used when creating a new Quantum Gateway object.
:login => Your Quantum Gateway Gateway ID
:password => Your Quantum Gateway Vault Key or Restrict Key
NOTE: For testing supply your test GatewayLogin and GatewayKey
:email_receipt => true if you want a receipt sent to the customer (false be default)
:merchant_receipt => true if you want to override receiving the merchant receipt
:ignore_avs => true ignore both AVS and CVV verification :ignore_cvv => true don’t want to use CVV so continue processing even if CVV would have failed
38 39 40 41 42 |
# File 'lib/active_merchant/billing/gateways/quantum.rb', line 38 def initialize( = {}) requires!(, :login, :password) @options = super end |
Instance Method Details
#authorize(money, creditcard, options = {}) ⇒ Object
Request an authorization for an amount from CyberSource
51 52 53 54 |
# File 'lib/active_merchant/billing/gateways/quantum.rb', line 51 def (money, creditcard, = {}) setup_address_hash() commit(build_auth_request(money, creditcard, ), ) end |
#capture(money, authorization, options = {}) ⇒ Object
Capture an authorization that has previously been requested
57 58 59 60 |
# File 'lib/active_merchant/billing/gateways/quantum.rb', line 57 def capture(money, , = {}) setup_address_hash() commit(build_capture_request(money, , ), ) end |
#credit(money, identification, options = {}) ⇒ Object
77 78 79 80 |
# File 'lib/active_merchant/billing/gateways/quantum.rb', line 77 def credit(money, identification, = {}) deprecated CREDIT_DEPRECATION_MESSAGE refund(money, identification, ) end |
#purchase(money, creditcard, options = {}) ⇒ Object
Purchase is an auth followed by a capture You must supply an order_id in the options hash
64 65 66 67 |
# File 'lib/active_merchant/billing/gateways/quantum.rb', line 64 def purchase(money, creditcard, = {}) setup_address_hash() commit(build_purchase_request(money, creditcard, ), ) end |
#refund(money, identification, options = {}) ⇒ Object
73 74 75 |
# File 'lib/active_merchant/billing/gateways/quantum.rb', line 73 def refund(money, identification, = {}) commit(build_credit_request(money, identification, ), ) end |
#test? ⇒ Boolean
Should run against the test servers or not?
45 46 47 |
# File 'lib/active_merchant/billing/gateways/quantum.rb', line 45 def test? @options[:test] || Base.gateway_mode == :test end |
#void(identification, options = {}) ⇒ Object
69 70 71 |
# File 'lib/active_merchant/billing/gateways/quantum.rb', line 69 def void(identification, = {}) commit(build_void_request(identification, ), ) end |