public function getCurrency()
{
/**
* If there is no order yet we have
* to pull the currency from the Cart
*/
if (!$this->order instanceof OrderInterface) {
return $this->cartWrapper->get()->getAmount()->getCurrency()->getIso();
}
$amount = $this->order->getAmount();
if ($amount instanceof Money) {
$currency = $amount->getCurrency();
return $currency->getIso();
}
throw new LogicException(sprintf('Invalid Currency for Order [%d]', $this->getOrderId()));
}