Class: ActiveMerchant::Billing::QuantumGateway
- Defined in:
- lib/active_merchant/billing/gateways/quantum.rb
Constant Summary collapse
- LIVE_URL =
'https://secure.quantumgateway.com/cgi/xml_requester.php'
Constants inherited from Gateway
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.
-
#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
Methods included from CreditCardFormatting
Methods included from RequiresParameters
Methods included from PostsData
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 (false be default)
: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
48 49 50 51 52 |
# File 'lib/active_merchant/billing/gateways/quantum.rb', line 48 def initialize( = {}) requires!(, :login, :password) @options = super end |
Instance Method Details
#authorize(money, creditcard, options = {}) ⇒ Object
Request an authorization for an amount from CyberSource
61 62 63 64 |
# File 'lib/active_merchant/billing/gateways/quantum.rb', line 61 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
67 68 69 70 |
# File 'lib/active_merchant/billing/gateways/quantum.rb', line 67 def capture(money, , = {}) setup_address_hash() commit(build_capture_request(money, , ), ) end |
#credit(money, identification, options = {}) ⇒ Object
84 85 86 87 |
# File 'lib/active_merchant/billing/gateways/quantum.rb', line 84 def credit(money, identification, = {}) raise ArgumentError.new("Missing transaction id") unless hash.has_key?(param) if identification.blank? commit(build_credit_request(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
74 75 76 77 |
# File 'lib/active_merchant/billing/gateways/quantum.rb', line 74 def purchase(money, creditcard, = {}) setup_address_hash() commit(build_purchase_request(money, creditcard, ), ) end |
#test? ⇒ Boolean
Should run against the test servers or not?
55 56 57 |
# File 'lib/active_merchant/billing/gateways/quantum.rb', line 55 def test? @options[:test] || Base.gateway_mode == :test end |
#void(identification, options = {}) ⇒ Object
79 80 81 82 |
# File 'lib/active_merchant/billing/gateways/quantum.rb', line 79 def void(identification, = {}) raise ArgumentError.new("Missing transaction id") if identification.blank? commit(build_void_request(identification, ), ) end |