Hi,
From the documentation of
ec.europa.eu/taxation_customs/vies/checkVatService.wsdl
MS_UNAVAILABLE: The Member State service is unavailable, try again later or with another Member State;
The thing which is strange is that the SoapClient is called into a try catch so, it should be catch by HikaShop and not trigger the PHP error message.
You could use this code for the helper vat
function onlineCheck($vat){
//no online check for php4
if (extension_loaded('soap')) {
try{
$client = new SoapClient("http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl");
$vat = strtoupper(str_replace(array(' ','.'),array('',''),$vat));
$result = $client->checkVat(array('countryCode' => substr($vat, 0, 2), 'vatNumber' => substr($vat, 2)));
if(empty($result) || !$result->valid) {
$this->message = JText::_('VAT_NUMBER_NOT_VALID');
}
}catch(SoapFault $e) {
$this->message = $e->__toString();
$result = false;
}catch (Exception $e) {
$this->message = $e->__toString();
$result = false;
}
if ($result === false || empty($result) || !$result->valid ) {
$app =& JFactory::getApplication();
if($_REQUEST['tmpl']=='component'){
hikashop_display($this->message,'error');
}else{
$app->enqueueMessage($this->message);
}
return false;
}
}else{
$app =& JFactory::getApplication();
$this->message = JText::_('SOAP_EXTENSION_NOT_FOUND');
if($_REQUEST['tmpl']=='component'){
hikashop_display($this->message,'error');
}else{
$app->enqueueMessage($this->message);
}
return false;
}
return true;
}
But you got an error because the Member State service is unavailable, so that's not an bug in HikaShop.
Regards,