-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Validation failed for valid VAT numbers #136
Comments
It is probably the Vies::validateVatSum() method that return false negatives. |
@sunkaflek I can't reproduce this bug. What version of library are You using ? <?php
require './vendor/autoload.php';
$vies = new \DragonBe\Vies\Vies();
$result = $vies->validateVat(
'NL',
'001439542B97',
'FR',
'45497709824'
);
Both VAT numbers pass checksum validation test and are valid in Vies.
print_r($result->toArray()); Response:
returns |
@krzaczek Ah ok, this seems to be the problem. I have now tested installing latest release using composer require dragonbe/vies (that installs 2.2.0). This version does have the bug I mentioned above. But if I download the latest zipped code directly from github and use that way, the bug is gone. So I guess it has been fixed in some commit after 2.2.0 but has not been released as a new version yet? In my opinion this is quite a serious bug, I'd say it's worth a release. |
@sunkaflek Yes You are right. I will look into changes on the master branch, and will do my best to make a patch release today with the fix. |
@sunkaflek the only change I see is a fix for 32 bit architectures and this was done in a both NL and FR validator here. What platform are You having issues on ? |
@krzaczek It is 32bit PHP 7.4.4 so sounds like this could be it |
@sunkaflek i'm upgrading the code to support PHP 8.1. When this is done there will be a new 2.3.0 release - hopefully today |
@sunkaflek sorry for the delay. This has been released in 2.3.0 |
Hi,
I encountered several cases, where the library returns false negatives (invalid vat while VIES web service returns valid):
FR45497709824
NL001439542B97
Am I doing anything wrong?
Thank you
The text was updated successfully, but these errors were encountered: