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' }
- AVS_SUPPORTED_COUNTRIES =
['US', 'CA', 'UK', 'GB']
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.
82 83 84 85 86 87 |
# File 'lib/active_merchant/billing/gateways/orbital.rb', line 82 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
90 91 92 93 94 95 96 |
# File 'lib/active_merchant/billing/gateways/orbital.rb', line 90 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
108 109 110 |
# File 'lib/active_merchant/billing/gateways/orbital.rb', line 108 def capture(money, , = {}) commit(build_mark_for_capture_xml(money, , )) end |
#credit(money, authorization, options = {}) ⇒ Object
120 121 122 123 |
# File 'lib/active_merchant/billing/gateways/orbital.rb', line 120 def credit(money, , = {}) deprecated CREDIT_DEPRECATION_MESSAGE refund(money, , ) end |
#purchase(money, creditcard, options = {}) ⇒ Object
AC – Authorization and Capture
99 100 101 102 103 104 105 |
# File 'lib/active_merchant/billing/gateways/orbital.rb', line 99 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
113 114 115 116 117 118 |
# File 'lib/active_merchant/billing/gateways/orbital.rb', line 113 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
126 127 128 129 |
# File 'lib/active_merchant/billing/gateways/orbital.rb', line 126 def void(, = {}) order = build_void_request_xml(, ) commit(order) end |