public function getAmountBySmallestCurrencyUnit(PayableInterface $payable) { return in_array($payable->getPayableCurrency(), $this->_zeroDecimalCurrencies) ? (int) $payable->getPayableAmount() : (int) ($payable->getPayableAmount() * 100); }
public function failure(PayableInterface $payable) { $this->addFlash('error', sprintf('Could not refund %s %s to customer. Please refund the amount manually.', number_format($payable->getPayableAmount(), 2), $payable->getPayableCurrency())); return $this->redirectToRoute($this->_url, ['orderID' => $payable->getOrder()->id]); }