pH-7 / eu-vat-validator

:moneybag: A simple and clean PHP library that validates EU VAT registration numbers against the central ec.europa.eu database (using the official europa API) :eu:
https://github.com/pH-7/eu-vat-validator
GNU General Public License v3.0
93 stars 17 forks source link

Add TIN check, Strict mode and Country check (idea for complementing this library) #14

Open ortegafernando opened 3 months ago

ortegafernando commented 3 months ago

Hi, I am not and expert in php, but I have found that you can complement this library with the Europe TIN check service.

It is almost the same as VIES/VAT service.

Porbably, my fork is quite bad and you can improve it a lot, but you may can use this fork for getting some pieces of codes and implement both VAT and TIN checking in one library.

Mine just works, but it is not polite.

pH-7 commented 3 months ago

Thank you so much for your contribution @ortegafernando!! 🎉 I really appreciate this! 😊

Could you add some unit tests (in a new test file). You can have a look at the existing unit tests already written - https://github.com/pH-7/eu-vat-validator/tree/main/tests/Vat

Any other testing or changes, please let me know. Then, I will be happy to merge your contribution to the project 🚀

Enjoy the rest of your weekend.

ortegafernando commented 3 months ago

Hi, I am a newbie but I have tried to make what you ask me, I have no way to check the test files. I hope you can test and find them ok. Thanks.

ortegafernando commented 3 months ago

Strict mode added

ortegafernando commented 2 months ago

Add COUNTRY_NOT_VALID exception to detect when the country is supported or not (both in VAT and TIN)

ortegafernando commented 2 months ago

Hello, have you got time to see/check this? Thanks.

ortegafernando commented 1 month ago

Hello, any news? thanks