-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
|
|
@ -1,4 +1,5 @@
|
||||||
7.10.17
|
7.10.17
|
||||||
|
- fixed: Forced to use a PayDriver even with a balance of 0 in the cart.
|
||||||
|
|
||||||
7.10.16
|
7.10.16
|
||||||
- fixed #12121: typ-o Asset_Map.templateIdEditPoint
|
- fixed #12121: typ-o Asset_Map.templateIdEditPoint
|
||||||
|
|
|
||||||
|
|
@ -925,7 +925,7 @@ sub www_checkout {
|
||||||
my $total = $self->calculateTotal;
|
my $total = $self->calculateTotal;
|
||||||
##Handle rounding errors, and checkout immediately if the amount is 0 since
|
##Handle rounding errors, and checkout immediately if the amount is 0 since
|
||||||
##at least the ITransact driver won't accept $0 checkout.
|
##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});
|
my $transaction = WebGUI::Shop::Transaction->create($session, {cart => $self});
|
||||||
$transaction->completePurchase('zero', 'success', 'success');
|
$transaction->completePurchase('zero', 'success', 'success');
|
||||||
$self->onCompletePurchase;
|
$self->onCompletePurchase;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue