-0.00 ne 0.00. Handle both cases of ~0 when checking out to intercept and finish the transaction immediately.
This commit is contained in:
parent
75c86a68f5
commit
52294139a0
2 changed files with 2 additions and 1 deletions
|
|
@ -925,7 +925,7 @@ sub www_checkout {
|
|||
my $total = $self->calculateTotal;
|
||||
##Handle rounding errors, and checkout immediately if the amount is 0 since
|
||||
##at least the ITransact driver won't accept $0 checkout.
|
||||
if (sprintf('%.2f', $total + $self->calculateShopCreditDeduction($total)) eq '0.00') {
|
||||
if (sprintf('%.2f', abs($total + $self->calculateShopCreditDeduction($total))) eq '0.00') {
|
||||
my $transaction = WebGUI::Shop::Transaction->create($session, {cart => $self});
|
||||
$transaction->completePurchase('zero', 'success', 'success');
|
||||
$self->onCompletePurchase;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue