You are here

public function CurrencylayerExchanger::apiUrl in Commerce Exchanger 8

URL from remote provider upon API call should be made.

Return value

string Returns full url.

Overrides ExchangerProviderRemoteInterface::apiUrl

File

src/Plugin/Commerce/ExchangerProvider/CurrencylayerExchanger.php, line 24

Class

CurrencylayerExchanger
Provides the Currencylayer.com exchange rates.

Namespace

Drupal\commerce_exchanger\Plugin\Commerce\ExchangerProvider

Code

public function apiUrl() {
  if ($this
    ->isEnterprise()) {
    return 'https://api.currencylayer.com/live';
  }
  return 'http://api.currencylayer.com/live';
}