fix error when amount is 0

This commit is contained in:
Marion Muszynski 2017-06-15 16:19:26 +02:00
parent 42951e75b3
commit 9e79b4dfc4

View File

@ -178,6 +178,9 @@ if ($request_type && $ppec->type) {
// @ANTADIS - if id_billing make transaction
if ($id_billing_to_use != 0) {
if($ppec->getTotalPaid() <= 0){
return Tools::redirectLink($ppec->context->link->getPageLink('order.php').'?step=3&cgv=1&paypal_error=1');
}
$ppec->DoReferenceTransaction($id_billing_to_use);
$amount_match = $ppec->rightPaymentProcess();