diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index 9b77c4210..28f4e994a 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -1,4 +1,5 @@ 7.10.17 + - fixed: Forced to use a PayDriver even with a balance of 0 in the cart. 7.10.16 - fixed #12121: typ-o Asset_Map.templateIdEditPoint diff --git a/lib/WebGUI/Shop/Cart.pm b/lib/WebGUI/Shop/Cart.pm index 9a16ae3ef..62cb80878 100644 --- a/lib/WebGUI/Shop/Cart.pm +++ b/lib/WebGUI/Shop/Cart.pm @@ -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;