Index: uc_eway.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/uc_eway/uc_eway.module,v
retrieving revision 1.2.2.2.2.3
diff -u -p -r1.2.2.2.2.3 uc_eway.module
--- uc_eway.module	21 Oct 2009 01:53:47 -0000	1.2.2.2.2.3
+++ uc_eway.module	26 Feb 2010 05:09:32 -0000
@@ -325,8 +325,12 @@ function uc_eway_charge($order_id, $amou
   $customer_address .= uc_get_zone_code($order->billing_zone) . ' ';
   $customer_address .= $customer_address_countrycode;
 
+  $eway_testing = variable_get('uc_eway_test_mode', UC_EWAY_TEST_MODE_DEFAULT);
+
+  $cust_id = $eway_testing ? UC_EWAY_CUSTOMER_ID_DEFAULT : variable_get('uc_eway_customer_id', UC_EWAY_CUSTOMER_ID_DEFAULT);
+
   $xml_data = array(
-    'ewayCustomerID' => variable_get('uc_eway_customer_id', UC_EWAY_CUSTOMER_ID_DEFAULT),
+    'ewayCustomerID' => $cust_id,
     'ewayTotalAmount' => uc_currency_format($amount, FALSE, FALSE, ''),
     'ewayCustomerFirstName' => $order->billing_first_name,
     'ewayCustomerLastName' => $order->billing_last_name,
@@ -345,7 +349,6 @@ function uc_eway_charge($order_id, $amou
     'ewayOption3' => '',
   );
 
-  $eway_testing = variable_get('uc_eway_test_mode', UC_EWAY_TEST_MODE_DEFAULT);
   switch (variable_get('uc_eway_mode', UC_EWAY_MODE_DEFAULT)) {
     case 'merchant_xml':
       $url = ($eway_testing) ? 'https://www.eway.com.au/gateway/xmltest/testpage.asp' : 'https://www.eway.com.au/gateway/xmlpayment.asp';
