public function getAmount()
    {
        $money = $this->getMoney();

        if ($money !== null) {
            $moneyFormatter = new DecimalMoneyFormatter($this->getCurrencies());

            return $moneyFormatter->format($money);
        }
    }
public function getAmount()
    {
        $money = $this->getMoney();

        if ($money !== null) {
            $moneyFormatter = new DecimalMoneyFormatter($this->getCurrencies());

            return $moneyFormatter->format($money);
        }
    }
public function getAmount ( ) { $ money = $ this -> getMoney ( ) ; if ( $ money !== null ) { $ moneyFormatter = new DecimalMoneyFormatter ( $ this -> getCurrencies ( ) ) ; return $ moneyFormatter -> format ( $ money ) ; } }
Validates and returns the formatted amount.

@throws InvalidRequestException on any validation failure.
@return string The amount formatted to the correct number of decimal places for the selected currency.
Validates and returns the formatted amount .