Skip to main content

HikaShop 6.7.1 – VIES VAT validation fails due to HTTP WSDL URL

More
3 hours 30 minutes ago #100000457 by thomas.eilers@gfse.org
-- Browser(s) name and version -- : Firefox 159.0

Hello,

We discovered an issue with the online VAT number validation in HikaShop 6.7.1.

Although the PHP SOAP extension is installed and enabled, the VIES validation failed with the following error:
Code:
SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl'
The error occurred in:
Code:
administrator/components/com_hikashop/helpers/vat.php

The problem:
HikaShop accepted fictitious VAT numbers such as
Code:
ATU00000000
and
Code:
ATU12345678
because the online validation failed and only the number format was checked.
This is particularly problematic because customers could receive VAT exemptions using invalid VAT numbers.

Our solution:
We changed the WSDL URL in the vat.php from:
Code:
http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl
to:
Code:
https://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl

After this modification, the validation works correctly:
  • Code:
    ATU00000000
    → Rejected
  • Code:
    ATU12345678
    → Rejected
  • Genuine, valid Austrian VAT number → Accepted
Could you please include this HTTPS correction in an upcoming HikaShop update?

It would also be helpful to review the fallback behavior when the VIES service is unavailable, as accepting unverified VAT numbers may result in incorrect tax exemptions.

Thank you for your support.
Best regards,

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

More
1 hour 8 minutes ago #100000460 by nicolas
Hi,

Thank you for the detailed report, you are right. The European Commission no longer serves the VIES WSDL over http (it now answers with a 403 error), so the online check could not reach the service and only the format of the number was verified.

This is fixed in the latest build of HikaShop 6.7.1: HikaShop now calls VIES over https, both for the WSDL and for the check itself (the WSDL still declares an http address for the service, so changing only the WSDL address, as you did, leaves the calls themselves on http). Download HikaShop 6.7.1 again from your account on our website and install it over your current installation: your settings are kept. As the version number is the same, the Joomla updater will not offer it, so the install has to be done manually. This also replaces your modification of vat.php.

We tested it with the "Online check" option: ATU00000000 and ATU12345678 are now refused and genuine Austrian VAT numbers are accepted.

About the fallback: when VIES itself cannot be reached (it is regularly unavailable, as a whole or for one member state), HikaShop accepts a number with a valid format and writes the failure in the HikaShop log. This is deliberate, as refusing the number in that case would block every company customer at checkout during each VIES outage. The failure being logged, you can check the numbers recorded during such periods. If you prefer to refuse them, a small plugin can take over the check through the onBeforeVATOnlineCheck event.

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

Time to create page: 0.064 seconds
Powered by Kunena Forum