You are here

function commerce_authnet_cim_server_url in Commerce Authorize.Net 7

Returns the URL to the Authorize.Net CIM server determined by transaction mode.

Parameters

$txn_mode: The transaction mode that relates to the live or test server.

Return value

The URL to use to submit requests to the Authorize.Net CIM server.

1 call to commerce_authnet_cim_server_url()
commerce_authnet_cim_request in ./commerce_authnet.module
Submits a CIM XML API request to Authorize.Net.

File

./commerce_authnet.module, line 2023
Implements Authorize.Net payment services for use in Drupal Commerce.

Code

function commerce_authnet_cim_server_url($txn_mode) {
  switch ($txn_mode) {
    case AUTHNET_TXN_MODE_LIVE:
    case AUTHNET_TXN_MODE_LIVE_TEST:
      return variable_get('commerce_authnet_cim_server_url_live', 'https://api2.authorize.net/xml/v1/request.api');
    case AUTHNET_TXN_MODE_DEVELOPER:
      return variable_get('commerce_authnet_cim_server_url_dev', 'https://apitest.authorize.net/xml/v1/request.api');
  }
}