Skip Menu |

This queue is for tickets about the Business-Tax-VAT-Validation CPAN distribution.

Report information
The Basics
Id: 75405
Status: resolved
Priority: 0/
Queue: Business-Tax-VAT-Validation

People
Owner: bpgn [...] cpan.org
Requestors: bart.heupers [...] xs4all.nl
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 0.22
Fixed in: (no value)



Subject: VAT validation does not seem to work anymore
The VAT validation did not seem to work any more, probably because the VIES website changed formatting. In our local version I have fixed by changing _is_res_ok with : sub _is_res_ok { my($self,$res)=@_; if ($res=~/^(\d{3}) (.*)/) { return $self->_set_error($1, $2) } if ($res =~ /\>\s*No\, invalid VAT number/m) { return $self->_set_error(2, "This VAT number doesn't exists in EU database.") } elsif ($res =~ /\>\s*Error\: (.*)$/im) { return $self->_set_error(3, "This VAT number contains errors: ".$1) } elsif ($res =~ /Request time-out\. Please re-submit your request later/m){ return $self->_set_error(17, "Time out connecting to the database") } elsif ($res =~ /\>\s*Member State service unavailable/m) { return $self->_set_error(18, "Member State service unavailable: Please re-submit your request later.") } elsif ($res =~ /\>\s*(System busy: Too many requests)\. (Please re-submit your request later\.)/m) { return $self->_set_error(19, "$1: $2") } return 1 if $res =~ /\>\s*Yes\, valid VAT number\s*$/m; $self->_set_error(257, "Invalid response, please contact the author of this module. ".$res) } The complete fixed module is attached.
Subject: Validation.pm

Message body is not shown because it is too large.

Fixed in version 0.23
Subject: Re: [rt.cpan.org #75405] VAT validation does not seem to work anymore
Date: Wed, 29 Feb 2012 20:15:25 +0100
To: <bug-Business-Tax-VAT-Validation [...] rt.cpan.org>
From: Bernard Nauwelaerts <bpn [...] it-dev.be>
Dear Bart, Thanks a lot for your report and your submission. I uploaded the fixed version to CPAN, it should be available very soon. Please note that the regexp matching the "Yes, valid VAT number" response was also broken, so that I fixed it too. Have a nice evening ! Best regards, Bernard On Wed, 29 Feb 2012 06:22:42 -0500, Bart Heupers via RT wrote: Show quoted text
> Wed Feb 29 06:22:41 2012: Request 75405 was
acted upon. Show quoted text
> Transaction: Ticket created by bheupers > Queue:
Business-Tax-VAT-Validation Show quoted text
> Subject: VAT validation does not seem to
work anymore Show quoted text
> Broken in: 0.22 > Severity: Critical > Owner: Nobody >
Requestors: bart.heupers@xs4all.nl [1] Show quoted text
> Status: new > Ticket
https://rt.cpan.org/Ticket/Display.html?id=75405 > Show quoted text
> > The VAT
validation did not seem to work any more, probably because the Show quoted text
> VIES
website changed formatting. Show quoted text
> > In our local version I have fixed by
changing _is_res_ok with : Show quoted text
> > sub _is_res_ok { > my($self,$res)=@_; >
if ($res=~/^(d{3}) (.*)/) { Show quoted text
> return $self->_set_error(, ) > } > if
($res =~ />s*No, invalid VAT number/m) { Show quoted text
> return $self->_set_error(2,
"This VAT number doesn't exists in Show quoted text
> EU database.") > } elsif ($res =~
/>s*Error: (.*)$/im) { Show quoted text
> return $self->_set_error(3, "This VAT number
contains errors: ".) Show quoted text
> } elsif ($res =~ /Request time-out. Please
re-submit your request Show quoted text
> later/m){ > return $self->_set_error(17, "Time
out connecting to the database") Show quoted text
> } elsif ($res =~ />s*Member State
service unavailable/m) { Show quoted text
> return $self->_set_error(18, "Member State
service unavailable: Show quoted text
> Please re-submit your request later.") > } elsif
($res =~ />s*(System busy: Too many requests). (Please Show quoted text
> re-submit your
request later.)/m) { Show quoted text
> return $self->_set_error(19, ": ") > } > return 1
if $res =~ />s*Yes, valid VAT numbers*$/m; Show quoted text
> $self->_set_error(257,
"Invalid response, please contact the author Show quoted text
> of this module. ".$res) >
} Show quoted text
> > The complete fixed module is attached.
-- Bernard Nauwelaerts IT Development Gorges du Loup, 5 B4877 Olne Belgium Mobile: +32 477 433 884 E-Mail: bpn@it-development.be NOTICE This email was sent from within the Belgian company IT Development. This email (and any attachments or hyperlinks within it) may contain information that is confidential, legally privileged or otherwise protected from disclosure. If you are not the intended recipient of this email, you are not entitled to use, disclose, distribute, copy, print, disseminate or rely on this email in any way. If you have received this email in error, please notify the sender immediately by telephone or email and destroy it, and all copies of it. We have taken steps to ensure that this email (and any attachments) are free of computer viruses and the like. However, it is the recipient's responsibility to ensure that it is actually virus free. Any emails that you send to us may be monitored for the purposes of ascertaining whether the communication complies with the law and our policies. Links: ------ [1] mailto:bart.heupers@xs4all.nl
Subject: Re: [rt.cpan.org #75405] VAT validation does not seem to work anymore
Date: Wed, 29 Feb 2012 20:37:40 +0100
To: bug-Business-Tax-VAT-Validation [...] rt.cpan.org
From: "Bart Heupers" <Bart.Heupers [...] xs4all.nl>
Dear Bernard, Thanks for notifying me about the regexp that was still wrong. It took me some time to realize why it seemed to work. I will wait for 0.23 version to appear on CPAN. Best regards, Bart heup Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=75405 > > > > > Dear Bart, > > Thanks a lot for your report and your submission. > > I > uploaded the fixed version to CPAN, it should be available very soon. > > > Please note that the regexp matching the "Yes, valid VAT number" > response was also broken, so that I fixed it too. > > Have a nice evening > ! > > Best regards, > > Bernard > > On Wed, 29 Feb 2012 06:22:42 -0500, Bart > Heupers via RT wrote: >
>> Wed Feb 29 06:22:41 2012: Request 75405 was
> acted upon.
>> Transaction: Ticket created by bheupers >> Queue:
> Business-Tax-VAT-Validation
>> Subject: VAT validation does not seem to
> work anymore
>> Broken in: 0.22 >> Severity: Critical >> Owner: Nobody >>
> Requestors: bart.heupers@xs4all.nl [1]
>> Status: new >> Ticket
> https://rt.cpan.org/Ticket/Display.html?id=75405 >
>> >> The VAT
> validation did not seem to work any more, probably because the
>> VIES
> website changed formatting.
>> >> In our local version I have fixed by
> changing _is_res_ok with :
>> >> sub _is_res_ok { >> my($self,$res)=@_; >>
> if ($res=~/^(d{3}) (.*)/) {
>> return $self->_set_error(, ) >> } >> if
> ($res =~ />s*No, invalid VAT number/m) {
>> return $self->_set_error(2,
> "This VAT number doesn't exists in
>> EU database.") >> } elsif ($res =~
> />s*Error: (.*)$/im) {
>> return $self->_set_error(3, "This VAT number
> contains errors: ".)
>> } elsif ($res =~ /Request time-out. Please
> re-submit your request
>> later/m){ >> return $self->_set_error(17, "Time
> out connecting to the database")
>> } elsif ($res =~ />s*Member State
> service unavailable/m) {
>> return $self->_set_error(18, "Member State
> service unavailable:
>> Please re-submit your request later.") >> } elsif
> ($res =~ />s*(System busy: Too many requests). (Please
>> re-submit your
> request later.)/m) {
>> return $self->_set_error(19, ": ") >> } >> return 1
> if $res =~ />s*Yes, valid VAT numbers*$/m;
>> $self->_set_error(257,
> "Invalid response, please contact the author
>> of this module. ".$res) >>
> }
>> >> The complete fixed module is attached.
> > -- > Bernard > Nauwelaerts > IT Development > Gorges du Loup, 5 > B4877 Olne Belgium > Mobile: > +32 477 433 884 > E-Mail: bpn@it-development.be > > NOTICE > This email was > sent from within the Belgian company IT Development. > This email (and any > attachments or hyperlinks within it) may contain > information that is > confidential, legally privileged or otherwise protected from > disclosure. > If you are not the intended recipient of this email, you are > not entitled to use, disclose, distribute, copy, print, disseminate or > rely on this email in any way. If you have received this email in error, > please notify the sender immediately by telephone or email and destroy > it, and all copies of it. > > We have taken steps to ensure that this email > (and any attachments) are free of computer viruses and the like. > However, it is the recipient's responsibility to ensure that it is > actually virus free. Any emails that you send to us may be monitored for > the purposes of ascertaining whether the communication complies with the > law and our policies. > > > Links: > ------ > [1] > mailto:bart.heupers@xs4all.nl > >
RT-Send-CC: Bart.Heupers [...] xs4all.nl, bpn [...] it-dev.be
On Wed Feb 29 14:13:01 2012, BPGN wrote: Show quoted text
> Fixed in version 0.23
I find that validation of spanish VAT numbers is still broken in 0.23. Although in the website all the form parameter names have changed, it seems that adding traderName as extra param to the existing post request fixes the problem: my $req = POST $self->{baseurl}, [ 'selectedLanguage' => 'EN', 'ms' => $mscc , 'vat' => $vatn , 'iso' => $mscc , 'traderName' => '' ];
CC: <Bart.Heupers [...] xs4all.nl>
Subject: Re: [rt.cpan.org #75405] VAT validation does not seem to work anymore
Date: Wed, 07 Mar 2012 10:18:54 +0100
To: <bug-Business-Tax-VAT-Validation [...] rt.cpan.org>
From: Bernard Nauwelaerts <bpn [...] it-dev.be>
Dear Henry, I have updated the module, but don't have any valid spanish VAT number to check if it works as expected. Could you please do it with http://itdev.be/software/PERL/Business-Tax-VAT-Validation/Business-Tax-VAT-Validation-0.24.tar.gz ? Thank you very much, Bernard On Fri, 2 Mar 2012 07:44:52 -0500, Henry Tang via RT wrote: Show quoted text
>
https://rt.cpan.org/Ticket/Display.html?id=75405 > Show quoted text
> > On Wed Feb 29
14:13:01 2012, BPGN wrote: Show quoted text
>> Fixed in version 0.23
> I find that
validation of spanish VAT numbers is still broken in 0.23. Although in the website all the form parameter names have changed, it seems that adding traderName as extra param to the existing post request fixes the problem: my $req = POST $self->{baseurl}, [ 'selectedLanguage' => 'EN', 'ms' => $mscc , 'vat' => $vatn , 'iso' => $mscc , 'traderName' => '' ]; -- Bernard Nauwelaerts IT Development Gorges du Loup, 5 B4877 Olne Belgium Mobile: +32 477 433 884 E-Mail: bpn@it-development.be NOTICE This email was sent from within the Belgian company IT Development. This email (and any attachments or hyperlinks within it) may contain information that is confidential, legally privileged or otherwise protected from disclosure. If you are not the intended recipient of this email, you are not entitled to use, disclose, distribute, copy, print, disseminate or rely on this email in any way. If you have received this email in error, please notify the sender immediately by telephone or email and destroy it, and all copies of it. We have taken steps to ensure that this email (and any attachments) are free of computer viruses and the like. However, it is the recipient's responsibility to ensure that it is actually virus free. Any emails that you send to us may be monitored for the purposes of ascertaining whether the communication complies with the law and our policies.
RT-Send-CC: bpn [...] it-dev.be
Hi Bernard, Yes, 0.24 works! Thank you! Best regards, Henry On Wed Mar 07 04:19:16 2012, bpn@it-dev.be wrote: Show quoted text
> > > Dear Henry, > > I have updated the module, but don't have any valid > spanish VAT number to check if it works as expected. Could you please > do > it with > http://itdev.be/software/PERL/Business-Tax-VAT-Validation/Business- > Tax-VAT-Validation-0.24.tar.gz > ? > > Thank you very much, > > Bernard > > On Fri, 2 Mar 2012 07:44:52 -0500, > Henry Tang via RT wrote: >
> >
> https://rt.cpan.org/Ticket/Display.html?id=75405 >
> > > > On Wed Feb 29
> 14:13:01 2012, BPGN wrote:
> >> Fixed in version 0.23
> > I find that
> validation of spanish VAT numbers is still broken in 0.23. Although in > the website all the form parameter names have changed, it seems that > adding traderName as extra param to the existing post request fixes > the > problem: my $req = POST $self->{baseurl}, [ 'selectedLanguage' => > 'EN', > 'ms' => $mscc , 'vat' => $vatn , 'iso' => $mscc , 'traderName' => '' > ];
Fixed in version 0.24