Business-Tax-VAT-Validation

 view release on metacpan or  search on metacpan

examples/vat.cgi  view on Meta::CPAN

    if ($hvatn->check($vat)) {
        print 'This number exists in the VIES database. It belongs to '.$hvatn->information('name')."  ".$hvatn->information('address');
    } else {
        print $hvatn->get_last_error_code.' '.$hvatn->get_last_error;
    }
}

    
print hr, start_form,
    "VAT Number", p,
    popup_menu(-name=>'MS',
                -values=>[$hvatn->member_states]),
    textfield('VAT'),p,
    submit,
    end_form,
    hr,
    h2("Disclaimer"), "This interface is provided for demonstration purposes only, WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.",
    p,
    'See also this disclaimer: <a href="http://ec.europa.eu/taxation_customs/vies/viesdisc.do?selectedLanguage=EN">http://ec.europa.eu/taxation_customs/vies/viesdisc.do?selectedLanguage=EN</a>';
    end_html;



( run in 2.270 seconds using v1.01-cache-2.11-cpan-364913b4093 )