Fixed a rounding error bug in the Ogone payment plugin.
This commit is contained in:
parent
0f70c99873
commit
13d1657d21
2 changed files with 4 additions and 1 deletions
|
|
@ -188,7 +188,7 @@ sub ogoneCheckoutButton {
|
|||
$self->{ _ogoneTransaction } = "done" ;
|
||||
|
||||
# Ogone needs the transaction amount in cents
|
||||
my $amount = $transaction->get('amount') * 100;
|
||||
my $amount = sprintf( "%.2f", $transaction->get('amount') ) * 100;
|
||||
$amount =~ s/[^\d]//g; # Remove any character from amount except digits.
|
||||
|
||||
my $orderId = $transaction->getId;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue