예제 #1
0
 public function getCurrencyRate(string $baseCurrency = null, string $targetCurrency = null) : float
 {
     return $this->converter->getExchangeRate($baseCurrency, $targetCurrency);
 }
 /**
  * {@inheritdoc}
  */
 public function visitOrder(OrderInterface $order)
 {
     $currency = $order->getCurrency();
     $currencyRate = $this->currencyConverter->getExchangeRate($currency);
     $order->setCurrencyRate($currencyRate);
 }