borni-dhifi / vatnumber

Automatically exported from code.google.com/p/vatnumber
GNU General Public License v3.0
0 stars 0 forks source link

Combine check_vat and check_vies in one function + get data from vies #22

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Hi, I have created a patch, that combines check_vat and check_vies functions 
into one check_vat_vies (first check by regexp and if valid, check vies) and 
one new function that will return a hash of informations from VIES if VATID is 
valid such as company name and address.

https://dropbox.stopkaconsulting.eu/add_check_vat_vies.patch

Can you apply this patch to a upstream or send me any feedback to 
marek.stopka@perlur.cz, and I will fix whatever you need me to fix to get this 
to upstream?

Thanks

Original issue reported on code.google.com by mareksto...@gmail.com on 24 Oct 2012 at 6:17

GoogleCodeExporter commented 8 years ago
I don't like to combine both method because we could have wrong validation or 
out dated. So the result of VIES is always correct (when the server is working).
But I agree check_vies could return more result than just a boolean but it 
should be done in a backward compatible way.

Original comment by cedric.krier@b2ck.com on 24 Oct 2012 at 6:35

GoogleCodeExporter commented 8 years ago

Original comment by cedric.krier@b2ck.com on 8 Nov 2012 at 11:35