viruschidai / validate-vat-ts

A library for validating VAT number
32 stars 13 forks source link

service returning 500, wsdl has changed #35

Closed mirbodis closed 2 years ago

mirbodis commented 2 years ago

Please add header and change parsing method.

correct header: "Content-Type": "text/xml; charset=utf-8"

new response:

<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
    <env:Header/>
    <env:Body>
        <ns2:checkVatResponse xmlns:ns2="urn:ec.europa.eu:taxud:vies:services:checkVat:types">
            <ns2:countryCode>XX</ns2:countryCode>
            <ns2:vatNumber>XXXXXX</ns2:vatNumber>
            <ns2:requestDate>2022-08-15+02:00</ns2:requestDate>
            <ns2:valid>true</ns2:valid>
            <ns2:name>XXXXXXXX</ns2:name>
            <ns2:address>XXXXXXXXX</ns2:address>
        </ns2:checkVatResponse>
    </env:Body>
</env:Envelope>
alemarcha commented 2 years ago

We are having troubles around here too with this. 😢

ParallelUniv3rse commented 2 years ago

I've opened up a pull request with a fix: https://github.com/viruschidai/validate-vat-ts/pull/36

LarsBuur commented 2 years ago

@viruschidai - please have a look here https://github.com/viruschidai/validate-vat-ts/pull/36. The package has stopped working.