Class: ActiveMerchant::Billing::OrbitalGateway
- Defined in:
- lib/active_merchant/billing/gateways/orbital.rb
Overview
For more information on Orbital, visit the integration center
Authentication Options
The Orbital Gateway supports two methods of authenticating incoming requests: Source IP authentication and Connection Username/Password authentication
In addition, these IP addresses/Connection Usernames must be affiliated with the Merchant IDs for which the client should be submitting transactions.
This does allow Third Party Hosting service organizations presenting on behalf of other merchants to submit transactions. However, each time a new customer is added, the merchant or Third-Party hosting organization needs to ensure that the new Merchant IDs or Chain IDs are affiliated with the hosting companies IPs or Connection Usernames.
If the merchant expects to have more than one merchant account with the Orbital Gateway, it should have its IP addresses/Connection Usernames affiliated at the Chain level hierarchy within the Orbital Gateway. Each time a new merchant ID is added, as long as it is placed within the same Chain, it will simply work. Otherwise, the additional MIDs will need to be affiliated with the merchant IPs or Connection Usernames respectively. For example, we generally affiliate all Salem accounts [BIN 000001] with their Company Number [formerly called MA #] number so all MIDs or Divisions under that Company will automatically be affiliated.
Constant Summary collapse
- API_VERSION =
"4.6"
- POST_HEADERS =
{ "MIME-Version" => "1.0", "Content-Type" => "Application/PTI46", "Content-transfer-encoding" => "text", "Request-number" => '1', "Document-type" => "Request", "Interface-Version" => "Ruby|ActiveMerchant|Proprietary Gateway" }
- CURRENCY_CODES =
{ "AUD" => '036', "CAD" => '124', "CZK" => '203', "DKK" => '208', "HKD" => '344', "ICK" => '352', "JPY" => '392', "MXN" => '484', "NZD" => '554', "NOK" => '578', "SGD" => '702', "SEK" => '752', "CHF" => '756', "GBP" => '826', "USD" => '840', "EUR" => '978' }
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
A – Authorization request.
-
#capture(money, authorization, options = {}) ⇒ Object
MFC - Mark For Capture.
- #credit(money, authorization, options = {}) ⇒ Object
-
#initialize(options = {}) ⇒ OrbitalGateway
constructor
A new instance of OrbitalGateway.
-
#purchase(money, creditcard, options = {}) ⇒ Object
AC – Authorization and Capture.
-
#refund(money, authorization, options = {}) ⇒ Object
R – Refund request.
-
#void(authorization, options = {}) ⇒ Object
setting money to nil will perform a full void.
Methods inherited from Gateway
#card_brand, card_brand, inherited, supports?, #test?
Methods included from CreditCardFormatting
Constructor Details
#initialize(options = {}) ⇒ OrbitalGateway
Returns a new instance of OrbitalGateway.
80 81 82 83 84 85 |
# File 'lib/active_merchant/billing/gateways/orbital.rb', line 80 def initialize( = {}) requires!(, :merchant_id) requires!(, :login, :password) unless [:ip_authentication] @options = super end |
Instance Method Details
#authorize(money, creditcard, options = {}) ⇒ Object
A – Authorization request
88 89 90 91 92 93 94 |
# File 'lib/active_merchant/billing/gateways/orbital.rb', line 88 def (money, creditcard, = {}) order = build_new_order_xml('A', money, ) do |xml| add_creditcard(xml, creditcard, [:currency]) add_address(xml, creditcard, ) end commit(order) end |
#capture(money, authorization, options = {}) ⇒ Object
MFC - Mark For Capture
106 107 108 |
# File 'lib/active_merchant/billing/gateways/orbital.rb', line 106 def capture(money, , = {}) commit(build_mark_for_capture_xml(money, , )) end |
#credit(money, authorization, options = {}) ⇒ Object
118 119 120 121 |
# File 'lib/active_merchant/billing/gateways/orbital.rb', line 118 def credit(money, , = {}) deprecated CREDIT_DEPRECATION_MESSAGE refund(money, , ) end |
#purchase(money, creditcard, options = {}) ⇒ Object
AC – Authorization and Capture
97 98 99 100 101 102 103 |
# File 'lib/active_merchant/billing/gateways/orbital.rb', line 97 def purchase(money, creditcard, = {}) order = build_new_order_xml('AC', money, ) do |xml| add_creditcard(xml, creditcard, [:currency]) add_address(xml, creditcard, ) end commit(order) end |
#refund(money, authorization, options = {}) ⇒ Object
R – Refund request
111 112 113 114 115 116 |
# File 'lib/active_merchant/billing/gateways/orbital.rb', line 111 def refund(money, , = {}) order = build_new_order_xml('R', money, .merge(:authorization => )) do |xml| add_refund(xml, [:currency]) end commit(order) end |
#void(authorization, options = {}) ⇒ Object
setting money to nil will perform a full void
124 125 126 127 |
# File 'lib/active_merchant/billing/gateways/orbital.rb', line 124 def void(, = {}) order = build_void_request_xml(, ) commit(order) end |