Skip to content

Commit

Permalink
Use https for wsdl url (#34)
Browse files Browse the repository at this point in the history
It seams like the url is not reachable via http any more.
  • Loading branch information
simonschaufi committed Dec 22, 2020
1 parent 7eeeec5 commit 211d672
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/Vies/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class Client
*
* @var string
*/
private $wsdl = 'http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl';
private $wsdl = 'https://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl';

/**
* SOAP client
Expand All @@ -29,9 +29,9 @@ class Client
*
* @var array
*/
private $classmap = array(
private $classmap = [
'checkVatResponse' => 'Ddeboer\Vatin\Vies\Response\CheckVatResponse'
);
];

/**
* Constructor
Expand All @@ -58,10 +58,10 @@ public function checkVat($countryCode, $vatNumber)
{
try {
return $this->getSoapClient()->checkVat(
array(
[
'countryCode' => $countryCode,
'vatNumber' => $vatNumber
)
]
);
} catch (SoapFault $e) {
throw new ViesException('Error communicating with VIES service', 0, $e);
Expand All @@ -78,11 +78,11 @@ private function getSoapClient()
if (null === $this->soapClient) {
$this->soapClient = new \SoapClient(
$this->wsdl,
array(
[
'classmap' => $this->classmap,
'user_agent' => 'Mozilla', // the request fails unless a (dummy) user agent is specified
'exceptions' => true,
)
]
);
}

Expand Down

0 comments on commit 211d672

Please sign in to comment.