dragonbe/vies
PHP Composer package to validate EU VAT numbers via the European Commission VIES SOAP service. Returns country code, VAT number, request date, validity, and (when available) registered company name and address. GDPR-friendly: no data stored by the package.
Full Changelog: https://github.com/DragonBe/vies/compare/2.3.1...2.3.2
Added a fix for country validation made by @julesdohmen
Because the VIES service has shifted to SSL/TLS we needed to adapt support for it ASAP.
In this version we now support SSL/TLS for VIES:
Much gratitude to @gregsmirnov-av for reporting this
With Brexit being final, we like to welcome Northern Ireland to the VAT validation service. A huge thanks for @jonathanmaron to provide the update to make this possible.
The country code for Northern Ireland is XI, but the original VAT ID's remain the same as they were for the UK.
This release was long overdue but because of work, life and Covid-19 a delay was unfortunately not preventable.
With this release we have a few new features and some bug fixes:
This release was made possible thanks to the help of @jellyNoone and @fabianwelzer. Great work folks 👍 and thank you for your contributions 🙇!
It has taken a while but this release is jam-packed with bug fixes and improvements.
Here's a list of what has been done:
A huge thanks and appreciation for @peter279k for his pull requests and to @krzaczek, @robmeek, @fidelo-software and @MPablo for reporting issues. Thank you all 🙇 for your time and efforts.
Enjoy this new release 🚀
Thanks to the contributions of @jbrinksmeier, @sophiekuehn and @krzaczek an issue validating Finnish VAT numbers is now fixed.
A big shoutout to the people making this library better 👏
Minor updates:
A big shoutout this time to @krzaczek for his swift actions and code updates, but also a big thank you to @Smitsel and @MollieRick for their contributions in getting this change mentioned and updated.
Didn't check the code style properly and it failed our build. Fixed in this version.
Where we used to have an issue with the time always being set to 02:00 was in fact the timezone the request was made and not the time. As was researched by @cottton, the VIES service returns only the date and the timezone where the request was made for.
So now this VIES service will return you the correct date and the correct timezone, but as the time itself is not returned, it will default to "00:00:00".
Kudos to @cottton for raising the issue and fixing the problem. 🏅
In issue #67 reported by @willemstuursma wrong input validation failed. This is fixed now in the latest release of VIES 2.1.7.
There was an issue validating VAT ID's for natural persons in Bulgaria, which this version fixes. Thanks to @mato61 for reporting it in issue #34.
This release has some interesting updates:
sensiolabs/security-checker by @arjankMany thanks to all for helping me improve this package. I wish all of you happy holidays and a wonderful 2019!
Michelangelo
This update contains no logic enhancements, only a few more examples to play with and an update of the README.md to explain the unexpected things that we have in our library like the EL prefix for Greek VAT ID's.
This fixes Issue #54 for Slovenian VAT ID's
This fixes Issue #54 for Slovenian VAT ID's
In PR #51 @Freeaqingme requested for a trader check by the VIES service but for some reason his contribution kept failing our unit tests.
So taking his suggestion to heart, I've build and implemented the basic functionality to perform VIES service-side checking of the additional information you pass along the request for validation.
I've also improved the code coverage to cover 100% of the code base and updated the README to better explain the functionality and the possibilities of the service.
I want to thank all that have suggested improvements on the code to make this tool a valuable part of your business workflow.
This is a small update:
We have just updated dependent composer packages We have added a GDPR statement in the README
This is a small update:
A massive "Thank You" to @nyamsprod and @krzaczek for their huge efforts making this new release of VIES possible. You both are my heroes!
This release contains the following fixes and updates:
As you see, work continues to improve VAT validation for your projects. If you like to participate, please review our CONTRIBUTING document and as always, please report issues or feature requests on the VIES project's issue tracker.
Thank you for your support in the project!
This is fix #35 created by @krzaczek to solve a problem processing BG VAT ID's
This is fix #35 created by @krzaczek to solve a problem processing BG VAT ID's
This release has updated VAT validation rules created by @krzaczek. We're very grateful for his work to make this package useful for everyone. #kudos
All PHP 5 versions are now end-of-life, only PHP 5.6 has security updates until 31 Dec 2018. That's why I have decided to upgrade immediately to PHP 7.1 and continue to support the PHP 7 releases.
This release is developed against PHP 7.1 as it supports:
I believe that by upgrading VIES to PHP 7.1 we support the #gophp7 initiative.
Support for older PHP versions will be maintained until 31 Dec 2018 as 1.0.x releases.
I understand it's not always easy to upgrade, but from a security point you must update your public servers to the latest PHP version. Please look at the supported PHP versions to see when a version is announced end-of-life.
I've discussed this with other project maintainers and following the PHP version support is the best way to move forward.
Fixing issue
A big thanks to @krzaczek for his contributions.
A big thanks to @jamesblackwell for his contribution in this release
We love VIES service provided by the European Commission, but we also have to be realistic and acknowledge the service might not be accessible from time to time.
To help you verify if the service is up and running, I've added a HeartBeat functionality to the project that will just verify if the service is online before you start querying the service.
A typical example would be the following
<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
$vies = new \DragonBe\Vies\Vies();
if (false === $vies->getHeartBeat()->isAlive()) {
echo 'Service is not available at the moment, please try again later.' . PHP_EOL;
} else {
// Using my own VAT to verify, should be valid
$result = $vies->validateVat('BE', '0811231190');
echo ($result->isValid() ? 'VALID' : 'INVALID') . ' VAT number' . PHP_EOL;
// Using bogus VAT to verify, should be invalid
$result = $vies->validateVat('BE', '1234567890');
echo ($result->isValid() ? 'VALID' : 'INVALID') . ' VAT number' . PHP_EOL;
}
I hope that this HeartBeat functionality will be a small, but valuable contribution to the project.
How can I help you explore Laravel packages today?