Document how and why we handle $0 checkouts
This commit is contained in:
parent
d986496131
commit
9ab13fb524
1 changed files with 2 additions and 0 deletions
|
|
@ -911,6 +911,8 @@ sub www_update {
|
|||
}
|
||||
if ($self->readyForCheckout()) {
|
||||
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') {
|
||||
my $transaction = WebGUI::Shop::Transaction->create($session, {self => $self});
|
||||
$transaction->completePurchase('zero', 'success', 'success');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue