Class: ActiveMerchant::Billing::OrbitalGateway
- Defined in:
- lib/active_merchant/billing/gateways/orbital.rb,
lib/active_merchant/billing/gateways/orbital/avs_result.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.
Defined Under Namespace
Classes: AVSResult
Constant Summary collapse
- API_VERSION =
"5.6"
- POST_HEADERS =
{ "MIME-Version" => "1.1", "Content-Type" => "application/PTI56", "Content-transfer-encoding" => "text", "Request-number" => '1', "Document-type" => "Request", "Interface-Version" => "Ruby|ActiveMerchant|Proprietary Gateway" }
- AVS_SUPPORTED_COUNTRIES =
['US', 'CA', 'UK', 'GB']
- 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' }
- ECOMMERCE_TRANSACTION =
INDUSTRY TYPES
'EC'
- RECURRING_PAYMENT_TRANSACTION =
'RC'
- MAIL_ORDER_TELEPHONE_ORDER_TRANSACTION =
'MO'
- INTERACTIVE_VOICE_RESPONSE =
'IV'
- AUTH_ONLY =
Auth Only No Capture
'A'
- AUTH_AND_CAPTURE =
AC - Auth and Capture = ‘AC’
'AC'
- FORCE_AUTH_ONLY =
F - Force Auth No Capture and no online authorization = ‘F’
'F'
- FORCE_AUTH_AND_CAPTURE =
FR - Force Auth No Capture and no online authorization = ‘FR’ FC - Force Auth and Capture no online authorization = ‘FC’
'FC'
- REFUND =
Refund and Capture no online authorization
'R'
- TAX_NOT_PROVIDED =
Tax Inds
0
- TAX_INCLUDED =
1
- NON_TAXABLE_TRANSACTION =
2
- CREATE =
Customer Profile Actions
'C'
- RETRIEVE =
'R'
- UPDATE =
'U'
- DELETE =
'D'
- RECURRING =
'R'
- DEFERRED =
'D'
- ACTIVE =
Status Profile Status Flag This field is used to set the status of a Customer Profile.
'A'
- INACTIVE =
'I'
- MANUAL_SUSPEND =
'MS'
- NO_MAPPING_TO_ORDER_DATA =
CustomerProfileOrderOverrideInd Defines if any Order Data can be pre-populated from the Customer Reference Number (CustomerRefNum)
'NO'
- USE_CRN_FOR_ORDER_ID =
'OI'
- USE_CRN_FOR_COMMENTS =
'OD'
- USE_CRN_FOR_ORDER_ID_AND_COMMENTS =
'OA'
- AUTO_GENERATE =
CustomerProfileFromOrderInd Method to use to Generate the Customer Profile Number When Customer Profile Action Type = Create, defines what the Customer Profile Number will be:
'A'
- USE_CUSTOMER_REF_NUM =
Auto-Generate the CustomerRefNum
'S'
- USE_ORDER_ID =
Use CustomerRefNum field
'O'
- USE_COMMENTS =
Use OrderID field
'D'
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
-
#add_customer_profile(creditcard, options = {}) ⇒ Object
Customer Profiles :customer_ref_num should be set unless your happy with Orbital providing one.
-
#authorize(money, creditcard, options = {}) ⇒ Object
A – Authorization request.
-
#capture(money, authorization, options = {}) ⇒ Object
MFC - Mark For Capture.
- #credit(money, authorization, options = {}) ⇒ Object
- #delete_customer_profile(customer_ref_num) ⇒ Object
-
#initialize(options = {}) ⇒ OrbitalGateway
constructor
Use Comments field.
-
#purchase(money, creditcard, options = {}) ⇒ Object
AC – Authorization and Capture.
-
#refund(money, authorization, options = {}) ⇒ Object
R – Refund request.
- #retrieve_customer_profile(customer_ref_num) ⇒ Object
- #update_customer_profile(creditcard, options = {}) ⇒ Object
- #void(authorization, options = {}, deprecated = {}) ⇒ Object
Methods inherited from Gateway
#card_brand, card_brand, inherited, supports?, #test?
Methods included from CreditCardFormatting
Constructor Details
#initialize(options = {}) ⇒ OrbitalGateway
Use Comments field
140 141 142 143 144 |
# File 'lib/active_merchant/billing/gateways/orbital.rb', line 140 def initialize( = {}) requires!(, :merchant_id) requires!(, :login, :password) unless [:ip_authentication] super end |
Instance Method Details
#add_customer_profile(creditcard, options = {}) ⇒ Object
Customer Profiles
:customer_ref_num should be set unless your happy with Orbital providing one
:customer_profile_order_override_ind can be set to map the CustomerRefNum to OrderID or Comments. Defaults to ‘NO’ - no mapping
'NO' - No mapping to order data
'OI' - Use <CustomerRefNum> for <OrderID>
'OD' - Use <CustomerRefNum> for <Comments>
'OA' - Use <CustomerRefNum> for <OrderID> and <Comments>
:order_default_description can be set optionally. 64 char max.
:order_default_amount can be set optionally. integer as cents.
:status defaults to Active
'A' - Active
'I' - Inactive
'MS' - Manual Suspend
223 224 225 226 227 |
# File 'lib/active_merchant/billing/gateways/orbital.rb', line 223 def add_customer_profile(creditcard, = {}) .merge!(:customer_profile_action => CREATE) order = build_customer_request_xml(creditcard, ) commit(order, :add_customer_profile) end |
#authorize(money, creditcard, options = {}) ⇒ Object
A – Authorization request
147 148 149 150 151 152 153 154 155 156 157 |
# File 'lib/active_merchant/billing/gateways/orbital.rb', line 147 def (money, creditcard, = {}) order = build_new_order_xml(AUTH_ONLY, money, ) do |xml| add_creditcard(xml, creditcard, [:currency]) unless creditcard.nil? && [:profile_txn] add_address(xml, creditcard, ) if @options[:customer_profiles] add_customer_data(xml, ) add_managed_billing(xml, ) end end commit(order, :authorize, [:trace_number]) end |
#capture(money, authorization, options = {}) ⇒ Object
MFC - Mark For Capture
173 174 175 |
# File 'lib/active_merchant/billing/gateways/orbital.rb', line 173 def capture(money, , = {}) commit(build_mark_for_capture_xml(money, , ), :capture) end |
#credit(money, authorization, options = {}) ⇒ Object
186 187 188 189 |
# File 'lib/active_merchant/billing/gateways/orbital.rb', line 186 def credit(money, , = {}) deprecated CREDIT_DEPRECATION_MESSAGE refund(money, , ) end |
#delete_customer_profile(customer_ref_num) ⇒ Object
241 242 243 244 245 |
# File 'lib/active_merchant/billing/gateways/orbital.rb', line 241 def delete_customer_profile(customer_ref_num) = {:customer_profile_action => DELETE, :customer_ref_num => customer_ref_num} order = build_customer_request_xml(nil, ) commit(order, :delete_customer_profile) end |
#purchase(money, creditcard, options = {}) ⇒ Object
AC – Authorization and Capture
160 161 162 163 164 165 166 167 168 169 170 |
# File 'lib/active_merchant/billing/gateways/orbital.rb', line 160 def purchase(money, creditcard, = {}) order = build_new_order_xml(AUTH_AND_CAPTURE, money, ) do |xml| add_creditcard(xml, creditcard, [:currency]) unless creditcard.nil? && [:profile_txn] add_address(xml, creditcard, ) if @options[:customer_profiles] add_customer_data(xml, ) add_managed_billing(xml, ) end end commit(order, :purchase, [:trace_number]) end |
#refund(money, authorization, options = {}) ⇒ Object
R – Refund request
178 179 180 181 182 183 184 |
# File 'lib/active_merchant/billing/gateways/orbital.rb', line 178 def refund(money, , = {}) order = build_new_order_xml(REFUND, money, .merge(:authorization => )) do |xml| add_refund(xml, [:currency]) xml.tag! :CustomerRefNum, [:customer_ref_num] if @options[:customer_profiles] && [:profile_txn] end commit(order, :refund, [:trace_number]) end |
#retrieve_customer_profile(customer_ref_num) ⇒ Object
235 236 237 238 239 |
# File 'lib/active_merchant/billing/gateways/orbital.rb', line 235 def retrieve_customer_profile(customer_ref_num) = {:customer_profile_action => RETRIEVE, :customer_ref_num => customer_ref_num} order = build_customer_request_xml(nil, ) commit(order, :retrieve_customer_profile) end |
#update_customer_profile(creditcard, options = {}) ⇒ Object
229 230 231 232 233 |
# File 'lib/active_merchant/billing/gateways/orbital.rb', line 229 def update_customer_profile(creditcard, = {}) .merge!(:customer_profile_action => UPDATE) order = build_customer_request_xml(creditcard, ) commit(order, :update_customer_profile) end |
#void(authorization, options = {}, deprecated = {}) ⇒ Object
191 192 193 194 195 196 197 198 199 |
# File 'lib/active_merchant/billing/gateways/orbital.rb', line 191 def void(, = {}, deprecated = {}) if(!.kind_of?(Hash)) deprecated("Calling the void method with an amount parameter is deprecated and will be removed in a future version.") return void(, deprecated.merge(:amount => )) end order = build_void_request_xml(, ) commit(order, :void, [:trace_number]) end |