public function TestExchanger::getRemoteData in Commerce Exchanger 8
Fetch external data.
Parameters
string|null $base_currency: If we fetch data based on specific currency.
Overrides ExchangerProviderRemoteInterface::getRemoteData
File
- tests/
modules/ commerce_exchanger_test/ src/ Plugin/ Commerce/ ExchangerProvider/ TestExchanger.php, line 32
Class
- TestExchanger
- Provides the test exchange rates.
Namespace
Drupal\commerce_exchanger_test\Plugin\Commerce\ExchangerProviderCode
public function getRemoteData($base_currency = NULL) {
return [
'EUR' => 0.13,
'USD' => 0.16,
'AUD' => 0.22,
];
}