VAT check not always working / webservice error

  • Posts: 5
  • Thank you received: 1
12 years 5 months ago #54662

Hi,
I selected the VAT online verification to check the user provided VAT number.
During the checkout, when exiting the payment step, the VAT check fails with one of the error messages:

1) No message, it simply stays on the same page

2) A Soap error fetching http header:
SoapFault exception: [HTTP] Error Fetching http headers in C:\inetpub\wwwroot\cms\administrator\components\com_hikashop\helpers\vat.php:138 Stack trace: #0 [internal function]: SoapClient->__doRequest('__call('checkVat', Array) #2 C:\inetpub\wwwroot\cms\administrator\components\com_hikashop\helpers\vat.php(138): SoapClient->checkVat(Array) #3 C:\inetpub\wwwroot\cms\administrator\components\com_hikashop\helpers\vat.php(48): hikashopVatHelper->onlineCheck('FRXXXXXXXXXXX')

3) A Soap error while parsing the WSDL file:
SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from ' ec.europa.eu/taxation_customs/vies/checkVatService.wsdl ' : failed to load external entity " ec.europa.eu/taxation_customs/vies/checkVatService.wsdl " in C:\inetpub\wwwroot\cms\administrator\components\com_hikashop\helpers\vat.php:137 Stack trace: #0 C:\inetpub\wwwroot\cms\administrator\components\com_hikashop\helpers\vat.php(137): SoapClient->SoapClient(' ec.europ ...') #1 C:\inetpub\wwwroot\cms\administrator\components\com_hikashop\helpers\vat.php(48): hikashopVatHelper->onlineCheck('FRXXXXXXXXXXX')

The complete stack trace report is attached. I have masked the VAT number, but the VAT number is correct and is sometimes validated.
I think about a timeout error maybe?

Anyway, how can I bypass this error and check the provided VAT number?

Using Hikashop essential 1.5.8 and joomla 2.5.4 on dev env. (localhost)

Thanks for any advice,
g.

Attachments:
Last edit: 12 years 5 months ago by gside. Reason: added hikashop and joomla version

Please Log in or Create an account to join the conversation.

  • Posts: 82864
  • Thank you received: 13372
  • MODERATOR
12 years 5 months ago #54665

Hi,

The VIES (the European agency in charge of VAT numbers checking) website is down at the moment. The only solution is to deactivate the online check for now until they fix their problems.

Please Log in or Create an account to join the conversation.

  • Posts: 5
  • Thank you received: 1
12 years 5 months ago #54671

Do you mean, the webservice is down at the moment?
Because the website is online and fully working here: ec.europa.eu/taxation_customs/vies/vatRequest.html

Also, does it means that if the VIES website is down, it will stop my shop with a technical error message?

Is there any way to hide this error and put on hold the order until manual verification is done?

Thanks,
g.

Please Log in or Create an account to join the conversation.

  • Posts: 82864
  • Thank you received: 13372
  • MODERATOR
12 years 5 months ago #54673

The website is online but not the webservice: ec.europa.eu/taxation_customs/vies/checkVatService.wsdl
Nor all the links related to it in the FAQ of the VIES:
ec.europa.eu/taxation_customs/vies/faq.html#item_16

That's indeed the case. If the VIES website is down, then the VAT numbers cannot be checked. So far, the webservice has been quite reliable so there was no need to have such fallback system.
You can disable the online check and only rely on the regex check and possibly manually verify the VAT numbers before shipping your goods in the mean time.

Please Log in or Create an account to join the conversation.

  • Posts: 11
  • Thank you received: 1
10 years 3 days ago #180687

Sorry for bringing this back after so long, but need to ask some details.

In the case the system does not work, checking at the vies site or via a soap operation we get errors, by the checkout, the page takes some time to load but then it goes to next page without adding the VAT (seems like the process was held correctly).
But as the system these days for example, for Germany, is not working, did Hikashop actually tested that correctly or accidentally removed the VAT?
I am sorry if I miss something there, but we would prefer that in such cases, of system failure, to add VAT and then refund it if needed, than not charge it at all..
If the Hikashop can not access the service, can it give an error? What happens in that case? We use the latest version..

Thanks a lot in advance for any help!!!

Please Log in or Create an account to join the conversation.

  • Posts: 82864
  • Thank you received: 13372
  • MODERATOR
10 years 1 day ago #180842

Hi,

With the current version, when the VIES system is down, HikaShop skips the check with the VIES and only the regex check is performed.
If you want to change that behavior, you can change the lines:

$this->message = $e->__toString();
				return true;
to:
$this->message = $e->__toString();
				$result = false;
in the file administrator/components/com_hikashop/helpers/vat.php
The VAT check system will thus refuse the VAT number if the VIES system is down and the user will have to either remove his VAT number to be able to proceed (and thus pay the VAT) or not checkout.

The following user(s) said Thank You: christinapsarrou

Please Log in or Create an account to join the conversation.

  • Posts: 11
  • Thank you received: 1
10 years 1 day ago #180891

Thanks a lot for the solution :) In that rare cases of Vies being down we prefer to charge the vat and then refund customer than let them purchase without it.. Thanks a lot again, we will change the code correspondingly :)

Please Log in or Create an account to join the conversation.

Time to create page: 0.076 seconds
Powered by Kunena Forum