From: eileen Date: Mon, 12 Apr 2021 03:23:07 +0000 (+1200) Subject: dev/core#2493 Stop attempting to format money in the processor class X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=87f2c4f3e734484e539b5328fa871ababfc10d48;p=civicrm-core.git dev/core#2493 Stop attempting to format money in the processor class We've said this is wrong before but it has survived until now because it seemed scarier to change it. However, now the reverse seems true. The value in amount should always be machine friendly and there are no known processors that expect locale specific formatting. On the other hand the format() function is intended to prepare money for DISPLAY which is not what is going on here --- diff --git a/CRM/Core/Payment.php b/CRM/Core/Payment.php index 8064029670..8a2b58fe38 100644 --- a/CRM/Core/Payment.php +++ b/CRM/Core/Payment.php @@ -1164,7 +1164,7 @@ abstract class CRM_Core_Payment { * @throws \CRM_Core_Exception */ protected function getAmount($params = []) { - return CRM_Utils_Money::format($params['amount'], NULL, NULL, TRUE); + return $params['amount']; } /**