Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Page 2 of 3
Added EU VAT ID validation service integration
 
dv_alala
Jr. Member
 
Total Posts:  1
Joined:  2012-01-28
 

I also cannot validate VAT

i get the following error:
(system.log)

2012-06-28T16:10:59+00:00 ERR (3): WarningSoapClient::SoapClient(http://ec.europa.eu/taxation_customs/vies
/services/checkVatService?wsdl): failed to open streamHTTP request failedHTTP/1.0 503 Service Unavailabl
e
  in 
/srv/www/shop_prod/app/code/core/Mage/Customer/Helper/Data.php on line 619
2012
-06-28T16:10:59+00:00 ERR (3): WarningSoapClient::SoapClient(): I/O warning failed to load external 
entity 
"http://ec.europa.eu/taxation_customs/vies/services/checkVatService?wsdl"  in /srv/www/shop_prod/app/
code/core/Mage/Customer/Helper/Data.php on line 619

which is strange as http://ec.europa.eu/taxation_customs/vies
/services/checkVatService?wsdl can be reached with a browser or a wget without trouble

 
Magento Community Magento Community
Magento Community
Magento Community
 
dparker
Jr. Member
 
Total Posts:  3
Joined:  2012-07-20
 

Did anyone get a definitive fix for this?

I\’ve followed the manual and set the TAX groups as needed but my own company VAT ID wont even validate. I have since also installed SOAP client/server on my webhosting but still it will not validate.

This feature was one of many that I was looking forward to as I am moving our shop away from oscommerce.

 
Magento Community Magento Community
Magento Community
Magento Community
 
insanus
Jr. Member
 
Total Posts:  2
Joined:  2010-02-25
 
dparker - 30 July 2012 06:30 AM

Did anyone get a definitive fix for this?

Don’t need a fix for the VAT ID feature - it’s working. Just setup and configured it for a Magento CE 1.7.0.2. Okay,.. the configuration isn’t really easy, but in the end it works. Just have a look at the Magento 1.7 manual (Appendix).

So what kind of problem do you have?

 
Magento Community Magento Community
Magento Community
Magento Community
 
dparker
Jr. Member
 
Total Posts:  3
Joined:  2012-07-20
 

In the Confirguation section where you put your own company details in it will not validate my company VAT number. I have already been through the manual and setup all my tax stuff as per the instuctions but still get a ‘VAT number invalid message’ I have tried it both with and witout the GB code but get the same response.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Urme
Jr. Member
 
Total Posts:  8
Joined:  2008-08-17
 

I’m still haven’t got this working. Seems like alot of people are having problem with this. I wrote my own little PHP-script, just to see if something was missing on my server, but this script works like a charm.

<?php
    $client 
= new SoapClient("http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl");
    
    
$checkvat $client->checkVat(array("countryCode" => 'SE',"vatNumber"=>55600000001));
    
    print 
'<pre>';
    
var_dump($checkvat);
    print 
'</pre>';
?>

Note: Not a valid VAT number in my example.

Something must be wrong… I’m going to buy a module soon that I hope works instead of the core implementation.

 
Magento Community Magento Community
Magento Community
Magento Community
 
fintan74
Jr. Member
 
Total Posts:  14
Joined:  2012-03-04
 

A large part of the EU VAT-validation system is working as it should in our shop. As stated above the SOAP is critical to this and it does take a few steps to set up (you will need the manual). I can validate our own VAT-number and customers can validate theirs. The system then also puts them into the correct groups (VAT-liable, VAT-exempt).

My problem is that VAT-exempt customers are then still applied the full 19% VAT, despite being in the correct 0% group. The funny thing is that when I turn the ‘ automatic grouping’-option off on the configuration page, the calculation is immediately correct (no VAT for VAT-exempt customers). Nothing else changes, so that leads me to believe there is some call missing in the VAT-calculation scripts.

I have therefore opened an issue-report for this over here: http://www.magentocommerce.com/bug-tracking/issue/?issue=13823

We recently had a suggestion for a code change, but that did not work on my end. If anybody has any input, that would be most appreciated. Thank you.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Onirico
Sr. Member
 
Total Posts:  93
Joined:  2011-01-04
 

Same problem. Someone has solved?

 
Magento Community Magento Community
Magento Community
Magento Community
 
daboss1984
Jr. Member
 
Total Posts:  15
Joined:  2010-12-28
 
dv_alala - 28 June 2012 07:20 AM

I also cannot validate VAT

i get the following error:
(system.log)

2012-06-28T16:10:59+00:00 ERR (3): WarningSoapClient::SoapClient(http://ec.europa.eu/taxation_customs/vies
/services/checkVatService?wsdl): failed to open streamHTTP request failedHTTP/1.0 503 Service Unavailabl
e
  in 
/srv/www/shop_prod/app/code/core/Mage/Customer/Helper/Data.php on line 619
2012
-06-28T16:10:59+00:00 ERR (3): WarningSoapClient::SoapClient(): I/O warning failed to load external 
entity 
"http://ec.europa.eu/taxation_customs/vies/services/checkVatService?wsdl"  in /srv/www/shop_prod/app/
code/core/Mage/Customer/Helper/Data.php on line 619

which is strange as http://ec.europa.eu/taxation_customs/vies
/services/checkVatService?wsdl can be reached with a browser or a wget without trouble

This one can possibly fixed by changing the file /app/code/core/Mage/Customer/Helper/Data.php or an overwrite of the

class Mage_Customer_Helper_Data

Its method

protected function _createVatNumberValidationSoapClient($trace false)
    
{
        
return new SoapClient(self::VAT_VALIDATION_WSDL_URL, array('trace' => $trace));
    
}

needs to get changed into (proxy_host/proxy_port don’t seem to be necessary, for me it would work w/o them)

protected function _createVatNumberValidationSoapClient($trace false)
    
{
        $options 
= array( 'soap_version'=>SOAP_1_1,
                            
'exceptions'=>true,
                            
'trace'=>1,
                            
'cache_wsdl'=> WSDL_CACHE_NONE,
                            
'user_agent' => 'Mozilla',
                            
'proxy_host' => '[2a01:e0b:1:143:62eb:69ff:fe8f:1764]',
                            
'proxy_port' => 80);
        return new 
SoapClient(self::VAT_VALIDATION_WSDL_URL$options);//array('trace' => $trace));
    
}

The reason is described here in the xtc:Modified-board as this webshop (and maybe many others) have the same problem: click here. (Sorry, the linked answer is in German, to summarize it: VIES changed from ipv4 to ipv6. During the change, they also reconfigured their proxy which now denies access to clients without a user-agent).

Now, I can at least validate VAT-IDs in the admin backend, haven’t tried the shop frontend yet. [edit: The validation also works in the frontend for me now /]

I hope this helps anyone smile

Bye

 
Magento Community Magento Community
Magento Community
Magento Community
 
RuntyC
Jr. Member
 
Total Posts:  2
Joined:  2012-09-27
 

i got my id well checked on system->conf->general->store info->VAT number, and even if its invalid, it detects. But on my frontend page, when i insert a new client with its VAT id, I think that magento don´t even checks it, just gives it as valid one.

 
Magento Community Magento Community
Magento Community
Magento Community
 
gregmoseley
Jr. Member
 
Total Posts:  11
Joined:  2011-02-21
 

Hi,

I can’t get this to work during checkout. It works if I register for an account, enter the address and then go through checkout, just not as part of checkout??

Any ideas?

Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
abhaya
Jr. Member
 
Avatar
Total Posts:  17
Joined:  2012-06-04
Poland
 

Thanks ~daboss1984
it worked for me!

 
Magento Community Magento Community
Magento Community
Magento Community
 
kalenjordan
Sr. Member
 
Avatar
Total Posts:  218
Joined:  2011-10-31
Pasadena, CA
 

This seems to be some kind of network routing issue.  It seems like @daboss1984\’s solution is using a proxy to get around that.  Maybe for some reason your servers don\’t have access to

http://ec.europa.eu/taxation_customs/vies/services/checkVatService?wsdl

@dv_alala, I know you mentioned that you were able to access the wsdl URL.  But were you accessing it from same machine where you were seeing this error occur?  In other words, if this was happening on your web server, were you wget\’ing from your web server and not from your local machine?

Also, a 503 error indicates that there is actually a problem on the server side, not on your side.  So it could have just been a temporary outage...?  But if you guys are still seeing this, then that may not be the case.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Bondjack
Jr. Member
 
Total Posts:  8
Joined:  2010-10-28
 

Hiya,

Any one with a solution for this problem already?

My log file gives me the following log entries when I hit the validate my own VAT number in the backend:

2013-01-12T21:27:38+00:00 ERR (3): Warning: SoapClient::SoapClient(http://ec.europa.eu/taxation_customs/vies/services/checkVatService?wsdl) [<a href=’soapclie$ in /home/users/anamcftp/xxxxxxx.nl/app/code/core/Mage/Customer/Helper/Data.php on line 619
2013-01-12T21:27:38+00:00 ERR (3): Warning: SoapClient::SoapClient() [<a href=’soapclient.soapclient’>soapclient.soapclient</a>]: I/O warning : failed to load$
2013-01-12T21:27:38+00:00 ERR (3): Strict Notice: Non-static method File::closeAll() should not be called statically in /usr/share/php/File.php on line 102

Any one a good solution?

 
Magento Community Magento Community
Magento Community
Magento Community
 
abhaya
Jr. Member
 
Avatar
Total Posts:  17
Joined:  2012-06-04
Poland
 

It works for me with these settings in class Mage_Customer_Helper_Data:

protected function _createVatNumberValidationSoapClient($trace false)
    
{
        $options 
= array( 'soap_version'=>SOAP_1_1,
            
'exceptions'=>true,
            
'trace'=>1,
            
'cache_wsdl'=> WSDL_CACHE_NONE,
            
'user_agent' => 'Mozilla',
            
'proxy_port' => 80);
        return new 
SoapClient(self::VAT_VALIDATION_WSDL_URL$options);
    
}
 
Magento Community Magento Community
Magento Community
Magento Community
 
admin23
Jr. Member
 
Total Posts:  3
Joined:  2011-02-20
 

Worked like a charm! Thank you

FYI, I copied the modified file to /app/core/local/Mage/Customer/Helper/Data.php so updates won’t ruin this change

abhaya - 17 January 2013 06:38 AM

It works for me with these settings in class Mage_Customer_Helper_Data:

protected function _createVatNumberValidationSoapClient($trace false)
    
{
        $options 
= array( 'soap_version'=>SOAP_1_1,
            
'exceptions'=>true,
            
'trace'=>1,
            
'cache_wsdl'=> WSDL_CACHE_NONE,
            
'user_agent' => 'Mozilla',
            
'proxy_port' => 80);
        return new 
SoapClient(self::VAT_VALIDATION_WSDL_URL$options);
    
}
 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top
Page 2 of 3