Git Product home page Git Product logo

Comments (8)

driesvints avatar driesvints commented on June 11, 2024

Doesn't https://github.com/driesvints/vat-calculator#handling-soap-faults works?

from vat-calculator.

pmochine avatar pmochine commented on June 11, 2024

@driesvints Thank you for your quick answer. Unfortunately, it does not work. It doesn't matter whether I set it to true or false.

if (isset($this->config) && $this->config->get('vat_calculator.forward_soap_faults')) {
    throw new VATCheckUnavailableException($e->getMessage(), $e->getCode(), $e->getPrevious());
}

return false;

The only difference is that an exception is thrown instead of a false.

from vat-calculator.

driesvints avatar driesvints commented on June 11, 2024

Ah I see. There's nothing you can do unfortunately. When VIES goes down the only thing to do is to wait until it's up again. Usually the way I handle things is to simply not validate the VAT number to unblock users and not stop people form making purchases.

from vat-calculator.

pmochine avatar pmochine commented on June 11, 2024

@driesvints Okay. It's just annoying in my example because I have developed an affiliate program where the affiliate has to validate his VAT number when registering to the affiliate program.

I'll have to figure something out. I just find it so funny how often VIES goes down.

from vat-calculator.

driesvints avatar driesvints commented on June 11, 2024

I just find it so funny how often VIES goes down.

Yeah, it's a joke really 😅

from vat-calculator.

pmochine avatar pmochine commented on June 11, 2024

@driesvints Not sure if you will read this again. Nonetheless, I just found another package similar to yours. And I didn't try it out yet, but you should also include a timeout option like in this line: https://github.com/ibericode/vat/blob/59831d65c8fbe2885228b09fc33a8ea5e1b5dee4/src/Vies/Client.php#L67

And another cool function would be to validate at least the format of the VAT. Have a look here: https://github.com/ibericode/vat/blob/59831d65c8fbe2885228b09fc33a8ea5e1b5dee4/src/Validator.php#L95

from vat-calculator.

driesvints avatar driesvints commented on June 11, 2024

Good thinking. Feel free to send in PR's for those if you want 👍

from vat-calculator.

pmochine avatar pmochine commented on June 11, 2024

@driesvints #143 😊

from vat-calculator.

Related Issues (20)

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.