From ab8285e2ecb171a6b2ac2ceccf4126778e639bd2 Mon Sep 17 00:00:00 2001 From: Andreas Radloff Date: Thu, 11 Jan 2024 16:54:54 +0100 Subject: [PATCH] passing currency as a string to DecimalMoneyParser is not supported in moneyphp 4 --- src/Message/AbstractRequest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Message/AbstractRequest.php b/src/Message/AbstractRequest.php index 0b0e3038..f10f7182 100644 --- a/src/Message/AbstractRequest.php +++ b/src/Message/AbstractRequest.php @@ -324,7 +324,7 @@ public function getMoney($parameterName = 'amount') throw new InvalidRequestException('Amount precision is too high for currency.'); } - $money = $moneyParser->parse((string) $number, $currency->getCode()); + $money = $moneyParser->parse((string) $number, $currency); // Check for a negative amount. if (!$this->negativeAmountAllowed && $money->isNegative()) {