DragonBe / vies

Component using the European Commission (EC) VAT Information Exchange System (VIES) to verify and validate VAT registration numbers in the EU, using PHP and Composer.

Home Page:http://ec.europa.eu/taxation_customs/vies/faqvies.do#item16

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Invalid VAT number doesn't mean that it's not real ;-)

michalsingr opened this issue · comments

if (! $this->validateVatSum($countryCode, $vatNumber)) {

This condition might be tricky... As my second test I've tried VAT CZ27082440 (the biggest e-shop in our country) which was evaluated by validateVatSum() method as invalid but it's existing and can be properly checked via VIES website.

I understand that the purpose of this is probably reducing requests to VEIS but IMHO I would not trust any EU administrator that a pattern (probably defined by law) for VAT number was fulfilled. As a result of this condition we get faked data, not real data from VIES.

Removing this condition or making it optional would help.

@michalsingr Just pushed a patch to fix this issue. Maybe it's a good idea to add a switch that would allow to disable check-sum checking and relay 100% on the VIES API.

@DragonBe