spaze / vat-calculator

[EOL, use driesvints/vat-calculator] Handle all the hard stuff related to EU MOSS tax/vat regulations, the way it should be. Fork of mpociot/vat-calculator, standalone, PHP 7.3+, modernized, with more features.
MIT License
48 stars 2 forks source link

Fetch WSDL over HTTPS #15

Closed spaze closed 4 years ago

spaze commented 4 years ago

The VIES WSDL is loaded over http://: https://github.com/spaze/vat-calculator/blob/07d9d631bddce33f20844cd617d08af42d15252d/src/VatCalculator.php#L20

It should be loaded over HTTPS, because they redirect to HTTPS anyway:

$ curl -i http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl
HTTP/1.1 307 Temporary Redirect
Location: https://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl
Cache-Control: no-cache
Pragma: no-cache
Content-Type: text/html; charset=utf-8
Proxy-Connection: close
Connection: close
Content-Length: 738

<HTML><HEAD>
<TITLE>Redirect</TITLE>
[...]

Upstream bug: https://github.com/mpociot/vat-calculator/issues/96