ApiLayerService.php
1 month ago
CurrencyLayer.php
1 month ago
ExchangeRatesApi.php
1 month ago
Fixerio.php
1 month ago
OpenExchangeRates.php
1 month ago
Service.php
1 month ago
ExchangeRatesApi.php
27 lines
| 1 | <?php |
| 2 | |
| 3 | namespace WCML\MultiCurrency\ExchangeRateServices; |
| 4 | |
| 5 | class ExchangeRatesApi extends ApiLayerService { |
| 6 | |
| 7 | public function getId() { |
| 8 | return 'exchangeratesapi'; |
| 9 | } |
| 10 | |
| 11 | public function getName() { |
| 12 | return 'Exchange rates API'; |
| 13 | } |
| 14 | |
| 15 | public function getUrl() { |
| 16 | return 'https://exchangeratesapi.io/'; |
| 17 | } |
| 18 | |
| 19 | protected function getApiLayerUrl() { |
| 20 | return 'https://api.apilayer.com/exchangerates_data/latest?base=%2$s&symbols=%3$s&amount=1'; |
| 21 | } |
| 22 | |
| 23 | protected function getApiLegacyUrl() { |
| 24 | return 'http://api.exchangeratesapi.io/v1/latest?access_key=%1$s&base=%2$s&symbols=%3$s'; |
| 25 | } |
| 26 | } |
| 27 |