--- uc_authorizenet.module	2009-10-20 13:58:08.000000000 -0700
+++ uc_authorizenet.patch.module	2009-11-20 20:16:26.000000000 -0800
@@ -107,6 +107,16 @@
     '#title' => t('Transaction Key'),
     '#default_value' => variable_get('uc_authnet_api_transaction_key', ''),
   );
+  $form['api_id_key']['uc_authnet_api_test_gateway_url'] = array(
+    '#type' => 'textfield',
+    '#title' => t('Authorize.net Test Gateway URL'),
+    '#default_value' => variable_get('uc_authnet_api_test_gateway_url', 'https://test.authorize.net/gateway/transact.dll'),
+  );
+  $form['api_id_key']['uc_authnet_api_live_gateway_url'] = array(
+    '#type' => 'textfield',
+    '#title' => t('Authorize.net Live Gateway URL'),
+    '#default_value' => variable_get('uc_authnet_api_live_gateway_url', 'https://secure.authorize.net/gateway/transact.dll'),
+  );
 
   $form['aim_settings'] = array(
     '#type' => 'fieldset',
@@ -508,10 +518,10 @@
 
   // Determine the correct URL based on the transaction mode.
   if (variable_get('uc_authnet_aim_txn_mode', 'live_test') == 'developer_test') {
-    $post_url = 'https://test.authorize.net/gateway/transact.dll';
+    $post_url = variable_get('uc_authnet_api_test_gateway_url', 'https://test.authorize.net/gateway/transact.dll');
   }
   else {
-    $post_url = 'https://secure.authorize.net/gateway/transact.dll';
+    $post_url = variable_get('uc_authnet_api_live_gateway_url', 'https://secure.authorize.net/gateway/transact.dll');
   }
 
   // Translate the data array into a string we can POST.
