zapadi / vies-dotnet Goto Github PK
View Code? Open in Web Editor NEWVIES (VAT Information Exchange System) dotNET API helps you to verify if EU VAT information exists and/or is valid
License: Apache License 2.0
VIES (VAT Information Exchange System) dotNET API helps you to verify if EU VAT information exists and/or is valid
License: Apache License 2.0
If you have the chance, could you look into why the build is not working? I fixed some cake issues with
#8 but Linux is still not working.
Let me know if I can support you in some way.
Fictional spanish VAT number ESB1233456899999 will return valid on the ViesManager.IsValid call even though it isn't
Hi
I'm not sure if I made something wrong, but I have problems validating a VAT number. I create a test project to test the library before use in my project. The sample VAT is IE3041081MH (I try to split into country code and vat number and not solves anything)
My code:
`
[Fact]
public async Task HappyPath()
{
var viesManager = new ViesManager();
var resultIsValid = ViesManager.IsValid("IE3041081MH");
Assert.True(resultIsValid.IsValid, "IE3041081MH" + " is invalid");
var resultIsActive = await viesManager.IsActive("IE3041081MH");
Assert.True(resultIsActive.IsValid, "IE3041081MH" + " is inactive");
}
`
When I try in the VIES web, the code is ok.
Thanks for your help and I don't know if I commit a mistake.
ViesManager.IsValid("GB569879648").IsValid
evaluates to true
, but VIES doesn't validate UK-VATs anymore.
Since ...IsActive(...) throws Padi.Vies.Errors.ViesServiceException: 'INVALID_INPUT'
maybe IsValid should not return true.
UK VATs can be validated via the UK tax service but I haven't found their API yet
Can you downgrade the targeted framework so I can use it in older projekt, please? There is no need to target the latest .NET standard I think. For me .NET standard 2.0 would be fine.
Steps to reproduce:
Call isActive()
with any valid VAT, e.g. DE210157578
:
using Padi.Vies;
var client = new ViesManager();
var result = await client.IsActive("DE210157578");
This results in a ViesServiceException
with message The given SOAPAction urn:ec.europa.eu:taxud:vies:services:checkVat does not match an operation.
I ran the integration tests of this library and they are all broken. I guess they implemented a breaking change in VIES?
I have simulated the request on Postman with the request SOAP contained in
private const string SoapValidateVatMessageFormat
<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header/>
<soapenv:Body>
<checkVat xmlns="urn:ec.europa.eu:taxud:vies:services:checkVat:types">
<countryCode>{0}</countryCode>
<vatNumber>{1}</vatNumber>
</checkVat>
</soapenv:Body>
</soapenv:Envelope>
and the server returns: ERROR 500: The server encountered an unexpected condition which prevented it from fulfilling the request.
If i remove <?xml version=\"1.0\" encoding=\"utf-8\"?>
the request complete successfuly.
So i suggest to update the const in:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header/>
<soapenv:Body>
<checkVat xmlns="urn:ec.europa.eu:taxud:vies:services:checkVat:types">
<countryCode>{0}</countryCode>
<vatNumber>{1}</vatNumber>
</checkVat>
</soapenv:Body>
</soapenv:Envelope>
It seems response of Vies API has changed and includes namespaces now:
<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>DE</ns2:countryCode>
<ns2:vatNumber>312635404</ns2:vatNumber>
<ns2:requestDate>2022-08-15+02:00</ns2:requestDate>
<ns2:valid>true</ns2:valid>
<ns2:name>---</ns2:name>
<ns2:address>---</ns2:address>
</ns2:checkVatResponse>
</env:Body>
</env:Envelope>
So this code does no longer work:
vies-dotnet/src/vies/ViesManager.cs
Line 367 in 151b95a
Suggestions:
<ns2:valid>....</vs2:valid>
https://ci.appveyor.com/project/zapadi/vies-dotnet/builds/36616597
Error publishing package. NuGet server returned 403: The specified API key is invalid, has expired, or does not have permission to access the specified package.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.