From 211d67253eec9105f151793b082a287147917540 Mon Sep 17 00:00:00 2001 From: Simon Schaufelberger Date: Tue, 22 Dec 2020 12:40:16 +0100 Subject: [PATCH] Use https for wsdl url (#34) It seams like the url is not reachable via http any more. --- src/Vies/Client.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Vies/Client.php b/src/Vies/Client.php index d1cdd3c..2b534d1 100644 --- a/src/Vies/Client.php +++ b/src/Vies/Client.php @@ -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 @@ -29,9 +29,9 @@ class Client * * @var array */ - private $classmap = array( + private $classmap = [ 'checkVatResponse' => 'Ddeboer\Vatin\Vies\Response\CheckVatResponse' - ); + ]; /** * Constructor @@ -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); @@ -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, - ) + ] ); }