=== modified file 'shipping/uc_ups/uc_ups.module' --- shipping/uc_ups/uc_ups.module 2009-04-18 01:05:58 +0000 +++ shipping/uc_ups/uc_ups.module 2009-04-27 18:27:47 +0000 @@ -812,7 +812,7 @@ if (user_access('configure quotes') && variable_get('uc_quote_display_debug', FALSE)) { $quotes[$ups_service]['error'][] = (string)$error->ErrorSeverity .' '. (string)$error->ErrorCode .': '. (string)$error->ErrorDescription; } - if ((string)$error->ErrorSeverity == 'HardError') { + if (strpos((string)$error->ErrorSeverity, 'Hard') !== FALSE) { // All or nothing quote. If some products can't be shipped by // a certain service, no quote is given for that service. If // that means no quotes are given at all, they'd better call in. @@ -1037,10 +1037,13 @@ if (isset($response->Response->Error)) { $error = $response->Response->Error; $error_msg = (string)$error->ErrorSeverity .' Error '. (string)$error->ErrorCode .': '. (string)$error->ErrorDescription; - drupal_set_message($error_msg, 'error'); //drupal_set_message('
'. print_r($_SESSION['ups']['packages'], TRUE) .'
' . htmlentities($request) .'

'. htmlentities($response->data)); - if ((string)$error->ErrorSeverity == 'HardError') { - return NULL; + if (strpos((string)$error->ErrorSeverity, 'Hard') !== FALSE) { + form_set_error('', $error_msg); + return FALSE; + } + else { + drupal_set_message($error_msg, 'error'); } } $charge = new stdClass();