The EU Commission moved the VIES service for validating VAT IDs from http to https. Older Magento shops that still used the old WSDL URL http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl could no longer validate VAT identification numbers as a result. Today https is the standard for VIES — the old http address no longer works.
The easy solution: install the update
We switched to the new endpoint early in EU VAT Enhanced — in Magento 2 from version 1.7.0 and in Magento 1 from version 1.8.5. Updating to one of these or a newer version resolves the issue with no further action. Updates are available through our update service.
Manual fix (if you cannot update)
If an immediate update is not possible, change the service URL in the file Vies.php from http to https. Find the service_url (or serviceUrl) property and replace:
- Before:
http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl - After:
https://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl
Depending on your installation type, the file is located at one of these paths:
- Magento 1:
/app/code/local/Geissweb/Euvatgrouper/Model/Validation/Vies.php - Magento 2 (app/code):
/app/code/Geissweb/Euvat/Model/Validation/Vies.php - Magento 2 (Composer):
/vendor/geissweb/module-euvat/Model/Validation/Vies.php
Then flush the Magento cache. VAT ID validation will work again afterwards.
Note: updating is still the better path, as the manual change is overwritten on the next update. Questions? We are happy to help.