Error: Payment amount must be a number

Created on 14 December 2019, almost 5 years ago
Updated 31 July 2024, 4 months ago

Hi,

First, thank you for a great module.
I have a small issue when I make payment for amount 10,000 "Payment amount must be a number"
If I change the amount to 10000 (without comma) then it works fine.

I check in the code and found this

$order_balance_amount_format = $currency_formatter->format($order_balance->getNumber(), $order_balance->getCurrencyCode());
$keypad_amount = preg_replace('/[^0-9\.,]/', '', $order_balance_amount_format);

This left the comma in the number.
Why don't we just get the amount like this? Then the return amount is valid number (without comma)

$keypad_amount = $order_balance->getNumber();
Feature request
Status

Needs review

Version

3.0

Component

Code

Created by

🇻🇳Vietnam howto

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024