private function normaliseAmount(PaymentRequest $request) { $amount = $request->getAmount(); if (is_null($amount)) { return array(); } return array('@currency' => $amount->getCurrency() == null ? "" : $amount->getCurrency(), '#' => $amount->getAmount()); }