diff --git a/README.md b/README.md index d9f12f4..6e1675b 100755 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ Here is the list of the currently implemented services. | Service | Base Currency | Quote Currency | Historical | |---------------------------------------------------------------------------|----------------------|----------------|----------------| -| [Fixer](http://fixer.io) | * | * | Yes | +| [Fixer](http://fixer.io) | EUR (free, no SSL), * (paid) | * | Yes | | [European Central Bank](http://www.ecb.europa.eu/home/html/index.en.html) | EUR | * | Yes | | [Google](http://www.google.com/finance) | * | * | No | | [Open Exchange Rates](https://openexchangerates.org) | USD (free), * (paid) | * | Yes | diff --git a/src/Service/Fixer.php b/src/Service/Fixer.php index ed371c4..31f0fb8 100755 --- a/src/Service/Fixer.php +++ b/src/Service/Fixer.php @@ -27,8 +27,8 @@ class Fixer extends HistoricalService { const ACCESS_KEY_OPTION = 'access_key'; - const LATEST_URL = 'https://api.fixer.io/latest?base=%s&access_key=%s'; - const HISTORICAL_URL = 'https://api.fixer.io/%s?base=%s&access_key=%s'; + const LATEST_URL = 'http://data.fixer.io/api/latest?base=%s&access_key=%s'; + const HISTORICAL_URL = 'http://data.fixer.io/api/%s?base=%s&access_key=%s'; /** * {@inheritdoc} diff --git a/tests/Tests/Service/FixerTest.php b/tests/Tests/Service/FixerTest.php index 76206b2..d268f80 100644 --- a/tests/Tests/Service/FixerTest.php +++ b/tests/Tests/Service/FixerTest.php @@ -34,7 +34,7 @@ public function it_supports_all_queries() */ public function it_throws_an_exception_with_error_response() { - $uri = 'https://api.fixer.io/latest?base=USD&access_key=x'; + $uri = 'http://data.fixer.io/api/latest?base=USD&access_key=x'; $content = file_get_contents(__DIR__.'/../../Fixtures/Service/Fixer/error.json'); $service = new Fixer($this->getHttpAdapterMock($uri, $content), null, ['access_key' => 'x']); @@ -46,7 +46,7 @@ public function it_throws_an_exception_with_error_response() */ public function it_fetches_a_rate() { - $uri = 'https://api.fixer.io/latest?base=EUR&access_key=x'; + $uri = 'http://data.fixer.io/api/latest?base=EUR&access_key=x'; $content = file_get_contents(__DIR__.'/../../Fixtures/Service/Fixer/latest.json'); $service = new Fixer($this->getHttpAdapterMock($uri, $content), null, ['access_key' => 'x']); @@ -61,7 +61,7 @@ public function it_fetches_a_rate() */ public function it_fetches_a_historical_rate() { - $uri = 'https://api.fixer.io/2000-01-03?base=USD&access_key=x'; + $uri = 'http://data.fixer.io/api/2000-01-03?base=USD&access_key=x'; $content = file_get_contents(__DIR__.'/../../Fixtures/Service/Fixer/historical.json'); $date = new \DateTime('2000-01-03');