Christiaan van Luik
Forum Replies Created
-
The condition for $fault->faultcode is my suggestion, it is not currently in the code. I added this example to illustrate what I mean. Of course you can always implement it differently. Checking >=500 and < 600 is an easy way of handling all server-related errors.
Hi Omar,
I saw the change, checked the code, thanks! However, it does not totally fix what I needed. Now, the solution only checks for defined error codes, like so.
$accepted_exception = array('MS_UNAVAILABLE', 'GLOBAL_MAX_CONCURRENT_REQ', 'MS_MAX_CONCURRENT_REQ');
if( in_array($exception->getMessage(), $accepted_exception) ) {
alg_wc_eu_vat_session_set( 'alg_wc_eu_vat_vies_error_message', $exception->getMessage() );
return false;
}But, for example if the VIES service servers are down, it does not return any of these codes but a 5xx error.
So, what I mean is add this kind of codetry {
// YOUR CODE HERE
} catch (SoapFault $fault) {
if ($fault->faultcode >= 500 && $fault->faultcode < 600) {
// Custom handling for 5xx errors
// ACCEPT THE VAT BECAUSE VIES IS DOWN
}
}Yes, indeed I want to turn off the validation if vies is down. Not for all errors ofcourse, if the number is invalid that should be shown.
- I also sell B2C and for B2B I would like to have the validation (as long as vies is working)
- It is maybe not compliant but if VIES is down for 30 minutes on a day it costs us orders / money, and we are willing not to comply. In order to comply it is allowed to verify afterwards. If the number is afterwards found to be invalid we can cancel the order and not ship or contact the customer to correct something. Anyway, dealing with the compliance is something we can do and are aware of.
Regarding: how to tell if VIES is down
I have used another EU vat plugin before, that had this functionality. I could check to see the code what conditions they have implemented. But what would seem logic to me is to activate this functionality under the following conditions:
- If VIES returns a 5xx error (their server is unreachable/down)
- If VIES does return a response but their error code is GLOBAL_MAX_CONCURRENT_REQ or MS_MAX_CONCURRENT_REQ
Or do it otherwise, and activate this functionality whenever the valid/invalid data is not in the response. Which is also an easy way to check.
Dear Moshtafizur,
Sometimes the VAT service is totally down. Like, the EU vat website is returning 5xx errors. In those cases I would like to accept everything that is inputted. Your suggested solution does not solve this.
So, I would like to request a new option/setting: to always accept the VAT number if VIES is not available or blocking the request. So that the customer can always checkout.
Forum: Plugins
In reply to: [MyListing Elementor Toolkit] NO reply after purchase the pro pluginResolved via email
Forum: Plugins
In reply to: [MyListing Elementor Toolkit] Elementor templates not loadingWithout more details I cannot help you.
You can send more details here or via the support form, https://plugins.yellowwave.eu/ask-a-question/, the support form is also a safe way to include the login to your site so that I can check.
Forum: Plugins
In reply to: [MyListing Elementor Toolkit] Where is comparison widget to compare listings?It has been added to v1.8.5 of the pro plugin
Forum: Plugins
In reply to: [MyListing Elementor Toolkit] Mapbox or OpenstreetmapWhich widget do you want this for? Because the plugin takes over the mylisting settings and choice for mapbox / google
Forum: Plugins
In reply to: [MyListing Elementor Toolkit] Elementor Dynamic tags not showing upDynamic tag requires elementor pro
Forum: Plugins
In reply to: [MyListing Elementor Toolkit] Listing CardsThis functionality is available in the paid pro version.
Forum: Plugins
In reply to: [MyListing Elementor Toolkit] Not redirect to file urlThis is not enough information to be able to help you. Can you maybe send screenshots of how everything is configured and set up?
Forum: Plugins
In reply to: [SMTP Mailing Queue] From name overriddenIt’s solved!
That is a nice and easy fix you did, I can confirm it works properly.
Forum: Plugins
In reply to: [MyListing Elementor Toolkit] Plugin Slows Down the SiteI see that you have already switched back to the default layout.
I was wondering if it happens only with specific widgets. What if you set a page with only the post title as template?If you know which widget & widget settings cause this behaviour let me know.
Looking at the queries, it seems to count the number of posts per listing type, I’m not quite sure where such a query is used.
Forum: Plugins
In reply to: [MyListing Elementor Toolkit] Dynamic Tags NOT ShowingThe black friday sale is over.
However, since you had trouble I can give you another coupon, send me an email on [email protected]
Since this is a support forum for the free plugin, lets handle additional question over the email too.