Fixed a rounding error bug in the Ogone payment plugin.

This commit is contained in:
Martin Kamerbeek 2009-07-15 14:08:05 +00:00
parent 0f70c99873
commit 13d1657d21
2 changed files with 4 additions and 1 deletions

View file

@ -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;