Giter VIP home page Giter VIP logo

vies-dotnet's Introduction

Hi there ๐Ÿ‘‹

vies-dotnet's People

Contributors

j-carvalho avatar lxbdev avatar robinlaevaert avatar sygmond avatar warredr avatar zapadi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

vies-dotnet's Issues

Downgrade targeted framework

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.

SOAPAction urn:ec.europa.eu:taxud:vies:services:checkVat does not match an operation

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?

Linux Build does not work

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.

Invalid ES vat returns valid

Fictional spanish VAT number ESB1233456899999 will return valid on the ViesManager.IsValid call even though it isn't

It seems like request SOAP is not updated

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>

Validation error on valid vat

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.

image

image

Thanks for your help and I don't know if I commit a mistake.

IsActive() returns null and invalid

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:

var isValid = content.GetValue("<valid>(true|false)</valid>");

Suggestions:

  • change to <ns2:valid>....</vs2:valid>
  • parse XML

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.