Elcodi\Bridge\PaymentSuiteBridgeBundle\Services\PaymentBridge::getCurrency PHP Метод

getCurrency() публичный Метод

Get the currency in which the order is paid
public getCurrency ( ) : string
Результат string
    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()));
    }