Since a few days there are always 'issues' with VAT validation... After some similar/related issues last year - that was a welcome improvement - the system does still allow the customers to finish and send the order (even when there's such an issue)... and we get an mail as the ones attached. It only used to happen every now and then - mostly when the VIES site was being updated or something like that.
But since a couple of days it seems that something goes wrong every time someone tries to order (and the VIES site is up and working)... and the messages differ... and - naturally - our customers get confused.
Just to let you know, we have not made any recent change to the VAT validation feature. B2BKing's last update has also been on April 23 (1 month ago), so I don't believe the issue has to do with a recent update.
I have now tested the VAT validation on our local test site, but I was able to validate numbers normally during registration.
Based on the errors in the messages there:
- "Could not connect to host "
- "SOAP-ERROR: Parsing WSDL: Couldn't load from
'https://ec.europa.eu/taxation_customs/vies/services/checkVatService.wsdl' : failed to load external entity "https://ec.europa.eu/taxation_customs/vies/services/checkVatService.wsdl""
There seems to be a general issue regarding the SOAP extension. I wonder if your hosting has changed the configuration of SOAP somehow, or changed the PHP version, added some firewall, etc. Similarly please look at whether you have added any recent security or antivirus plugin.
Does it happen for ALL requests / registrations, or just occasionally?
Would it be possible to share a backend login to the site or a staging site, so we can run some tests?
Hello Stefan, Thanks for the reply... I'll first check if anything on the hosting side changed/needs updating or is in an other way not as it should and will come back with either a 'problem solved' or renewed/different question...
We know that the VIES server if offline/updating almost weekly - either entirely or particular countries only. The issue I noticed is an exception as the VIES server was functioning normally for the VAT numbers/accounts that had problems.
If I can't find anything on our hosting site I will share more details/access to our site.
I tried to dig deeper... I even opted to turn off the VAT validation completely (by deselecting the "Validate VAT button at checkout" option in the Settings of B2b King) but that did not stop the error messages... Also - initially it seemed to only relate to NL VAT numbers but that is no longer the case.. Contacting our hosting provider - they confirmed no relevant/related updates were done in the past weeks - first did not help. But they suggested it may be because ipv6 is used to contact the https://ec.europa.eu/taxation_customs/vies/services/checkVatService.wsdl' : site (and also suggested to somehow force ipv4 to be used instead)... Needless to say I have no idea how to do that...
So... we still get the "Could not connect to host" error messages, customers abandon the ordering process because they get multiple error messages and nobody seems to know what causes it (or how to remedy it)...
I will try to see if we can resolve this by forcing ipv4 in the B2BKing code. I need some time to look into this and test - I will get back to you on it.
I would like to mention: if it is possible for you to share access with us to your site or a staging clone site, it would be helpful for testing, because for some reason we cannot reproduce the issue on our test site. But if not, it's fine also and I will try to test locally.
In the meantime, you can completely disable the VIES VAT validation by going to B2BKing -> Registration Fields -> VAT and disabling the checkbox here:
My appologies for the delay - somehow I did not get a notification of the message below. Anyway I have sent you the details by mail and look forward to hear if you've found something...
After a lot of tests, I think I found a way to make this work.
I updated B2BKing and added a different way of contacting the VIES server via cURL. Then this code snippet here tells the site to use this alternate way:
I'm sorry to have to notify you that the first new order went wrong too... Following the error message:
Message: A customer registered or ordered on your shop, but the VIES validation encountered an issue which is not the user's fault. The request was accepted, but you should manually check this VAT number and customer. Error details: Could not connect to host The VAT number is: JW The email of the user is:
This is the exact message; email of the user was missing. Needless to say I have stopped the VAT validation at registration in the 'Registration Fields' and for/during orders - in the settings... I will also activate your account again to give you access... same user name and password.
Any (new) ideas or solutions on your side?... I am asking as - with the VAT validation (for new customers) turned off - we start getting other users trying to register on our B2B site...
Hi Stefan, As long as we don't ask new customers to fill in their VAT number (and as long as we do not check the VAT number every time an existing customer makes an order) all was fine (since 'something' changed)....
But we DO need the VAT number of all (new) clients as otherwise our accounting system goes haywire. With intracommunal invoices - for instance - it has to be mentioned ON the actual document (with every order). We could choose not to check the VAT number (with the VIES server) for every transaction (but also that in past has caused issues when a company - for instance - moved and changed their VAT number).
I hope I am clear... and I'm wondering if/why nobody else has this (or a similar) issue when validating the VAT number.
Sorry, I think maybe my last message was poorly worded / confusing.
I meant to say that I deactivated the VAT number field temporarily, as I do not want to make changes to the site without your approval, as I know the site is live and taking orders.
I believe the issue should be fixed and all should be working normally now.
Please go to B2BKing -> Registration Fields and enable the VAT number field and test to confirm that it works as you need it. It seems to work in my tests.
I've done some tests and all seems to be working as it should... Only - in the past few days no new customers have registered - that will be the ultimate test. Fingers crossed all goes well...
Since a few days there are always 'issues' with VAT validation... After some similar/related issues last year - that was a welcome improvement - the system does still allow the customers to finish and send the order (even when there's such an issue)... and we get an mail as the ones attached. It only used to happen every now and then - mostly when the VIES site was being updated or something like that.
But since a couple of days it seems that something goes wrong every time someone tries to order (and the VIES site is up and working)... and the messages differ... and - naturally - our customers get confused.
Attached files: error_message_01.txt
error_message_02.txt
Hello Paul,
Just to let you know, we have not made any recent change to the VAT validation feature. B2BKing's last update has also been on April 23 (1 month ago), so I don't believe the issue has to do with a recent update.
I have now tested the VAT validation on our local test site, but I was able to validate numbers normally during registration.
Based on the errors in the messages there:
- "Could not connect to host "
- "SOAP-ERROR: Parsing WSDL: Couldn't load from
'https://ec.europa.eu/taxation_customs/vies/services/checkVatService.wsdl' :
failed to load external entity
"https://ec.europa.eu/taxation_customs/vies/services/checkVatService.wsdl""
There seems to be a general issue regarding the SOAP extension. I wonder if your hosting has changed the configuration of SOAP somehow, or changed the PHP version, added some firewall, etc. Similarly please look at whether you have added any recent security or antivirus plugin.
Does it happen for ALL requests / registrations, or just occasionally?
Would it be possible to share a backend login to the site or a staging site, so we can run some tests?
Kind regards,
Stefan
Hello Stefan,
Thanks for the reply... I'll first check if anything on the hosting side changed/needs updating or is in an other way not as it should and will come back with either a 'problem solved' or renewed/different question...
We know that the VIES server if offline/updating almost weekly - either entirely or particular countries only. The issue I noticed is an exception as the VIES server was functioning normally for the VAT numbers/accounts that had problems.
If I can't find anything on our hosting site I will share more details/access to our site.
Thanks in advance,
Paul
Hello Stefan,
I tried to dig deeper... I even opted to turn off the VAT validation completely (by deselecting the "Validate VAT button at checkout" option in the Settings of B2b King) but that did not stop the error messages... Also - initially it seemed to only relate to NL VAT numbers but that is no longer the case.. Contacting our hosting provider - they confirmed no relevant/related updates were done in the past weeks - first did not help. But they suggested it may be because ipv6 is used to contact the https://ec.europa.eu/taxation_customs/vies/services/checkVatService.wsdl' :
site (and also suggested to somehow force ipv4 to be used instead)... Needless to say I have no idea how to do that...
So... we still get the "Could not connect to host" error messages, customers abandon the ordering process because they get multiple error messages and nobody seems to know what causes it (or how to remedy it)...
Paul
Hello Paul,
Thank you for the update,
I will try to see if we can resolve this by forcing ipv4 in the B2BKing code. I need some time to look into this and test - I will get back to you on it.
I would like to mention: if it is possible for you to share access with us to your site or a staging clone site, it would be helpful for testing, because for some reason we cannot reproduce the issue on our test site. But if not, it's fine also and I will try to test locally.
In the meantime, you can completely disable the VIES VAT validation by going to B2BKing -> Registration Fields -> VAT and disabling the checkbox here:
Kind regards,
Stefan
Hello Stefan,
Could you let me know at what email address I can send you the login details?
Kind regards,
Paul
Hello Paul,
Please use our email at [email protected] for the account.
Hello Stefan,
My appologies for the delay - somehow I did not get a notification of the message below. Anyway I have sent you the details by mail and look forward to hear if you've found something...
Kind regards,
Paul
Hi Paul,
After a lot of tests, I think I found a way to make this work.
I updated B2BKing and added a different way of contacting the VIES server via cURL. Then this code snippet here tells the site to use this alternate way:
https://b2b.momantai-design.com/wp-admin/admin.php?page=wpcode-snippet-manager&snippet_id=12382
It seems to be working in my tests. Let me know if you see any further issues,
Kind regards,
Stefan
Hello Stefan,
Thanks for all the help... I'll keep a close eye on the status/messaging from the system.
I have also turned on the 'VAT validation at checkout' again in the Settings of B2B King. And I have deleted your user/admin account...
Kind regards and have a great start into the week,
Paul
Hello Stefan,
I'm sorry to have to notify you that the first new order went wrong too... Following the error message:
Message: A customer registered or ordered on your shop, but the VIES validation encountered an issue which is not the user's fault. The request was accepted, but you should manually check this VAT number and customer.
Error details: Could not connect to host
The VAT number is: JW
The email of the user is:
This is the exact message; email of the user was missing. Needless to say I have stopped the VAT validation at registration in the 'Registration Fields' and for/during orders - in the settings...
I will also activate your account again to give you access... same user name and password.
Paul
Hello Stefan,
Any (new) ideas or solutions on your side?... I am asking as - with the VAT validation (for new customers) turned off - we start getting other users trying to register on our B2B site...
Kind regards,
Paul
Hi Stefan,
As long as we don't ask new customers to fill in their VAT number (and as long as we do not check the VAT number every time an existing customer makes an order) all was fine (since 'something' changed)....
But we DO need the VAT number of all (new) clients as otherwise our accounting system goes haywire. With intracommunal invoices - for instance - it has to be mentioned ON the actual document (with every order). We could choose not to check the VAT number (with the VIES server) for every transaction (but also that in past has caused issues when a company - for instance - moved and changed their VAT number).
I hope I am clear... and I'm wondering if/why nobody else has this (or a similar) issue when validating the VAT number.
Kind regards,
Paul
Sorry, I think maybe my last message was poorly worded / confusing.
I meant to say that I deactivated the VAT number field temporarily, as I do not want to make changes to the site without your approval, as I know the site is live and taking orders.
I believe the issue should be fixed and all should be working normally now.
Please go to B2BKing -> Registration Fields and enable the VAT number field and test to confirm that it works as you need it. It seems to work in my tests.
Let me know if you still have any issues with it.
Hello Stefan,
I've done some tests and all seems to be working as it should... Only - in the past few days no new customers have registered - that will be the ultimate test. Fingers crossed all goes well...
We appreciate your help, hanks and kind regards,
Paul