Elcodi\Bridge\PaymentSuiteBridgeBundle\Services\PaymentBridge::getAmount PHP Method

getAmount() public method

Money value-object amounts are stored as integers, representing CENTS, so we have to divide by 100 since PaymentBridgeInterface expects a decimal value
public getAmount ( ) : integer
return integer
    public function getAmount()
    {
        /**
         * Tweak to allow payment methods to access
         * amount and currency when an order has not
         * been created yet.
         *
         * If there is no order yet we have
         * to pull the amount from the Cart
         */
        if (!$this->order instanceof OrderInterface) {
            return $this->cartWrapper->get()->getAmount()->getAmount();
        }
        $amount = $this->order->getAmount();
        if ($amount instanceof Money) {
            return $this->order->getAmount()->getAmount();
        }
        throw new LogicException(sprintf('Invalid Amount for Order [%d]', $this->getOrderId()));
    }