driesvints / vat-calculator

Handle all the hard stuff related to EU MOSS tax/vat regulations, the way it should be.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

IP6 adresses not working for VatCalculator::getIPBasedCountry()

kentdahl opened this issue · comments

Seems the IP2C service does not handle IPv6 adresses.

Ran into this issue while testing my web-app from my mobile phone in Norway.

file_get_contents(http://ip2c.org/2a02:2121:301:e44e:0:47:4cb1:7301): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
....
 at /....../vendor/mpociot/vat-calculator/src/Mpociot/VatCalculator/VatCalculator.php:427)
[stacktrace]
>#0 [internal function]: Illuminate\\Foundation\\Bootstrap\\HandleExceptions->handleError(2, 'file_get_conten...', '/var/www/0/1638...', 427, Array)
>#2 /...../vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(237): Mpociot\\VatCalculator\\VatCalculator->getIPBasedCountry()

See #83.

This will be in the next release.