public function error_handler( $order, $shipment, $function, $line, $error ) { switch( $error->faultstring ) { case 'Expired Authenticator': case 'Invalid Conversation Token': case 'Conversation Out-of-Sync': $this->get_auth(); break; case 'Insufficient Postage': $this->check_postage_balance( $order, $shipment ); default: slp_ajax_functions::error_handler( $function, __CLASS__, $line, $error->faultstring, $error ); } return; }
public function error_handler( $error, $order ) { switch( $error->Response->Error->ErrorCode ) { case '120802': //$this->verify_address( $order, false ); break; //case '151018': case '151062': case '154030': case '151019': case '150023': case '150022': case '151044': return $error; break; default: $error_msg = (string)$error->Response->Error->ErrorDescription; $error_code = (string)$error->Response->Error->ErrorCode; slp_ajax_functions::error_handler( __FUNCTION__, __CLASS__, __LINE__, $order, 'UPS Error: ' . $error_code, $error_msg ); } }