diff --git a/htdocs/public/payment/newpayment.php b/htdocs/public/payment/newpayment.php index 179e31d83cf..acd0f5e4740 100644 --- a/htdocs/public/payment/newpayment.php +++ b/htdocs/public/payment/newpayment.php @@ -284,10 +284,18 @@ if ($action == 'dopayment') $desc=GETPOST("desc",'alpha'); $mesg=''; - if (empty($PAYPAL_API_PRICE) || ! is_numeric($PAYPAL_API_PRICE)) $mesg=$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Amount")); + if (empty($PAYPAL_API_PRICE) || ! is_numeric($PAYPAL_API_PRICE)) + { + $mesg=$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Amount")); + $action = ''; + } //elseif (empty($EMAIL)) $mesg=$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("YourEMail")); //elseif (! isValidEMail($EMAIL)) $mesg=$langs->trans("ErrorBadEMail",$EMAIL); - elseif (! $origfulltag) $mesg=$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("PaymentCode")); + elseif (! $origfulltag) + { + $mesg=$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("PaymentCode")); + $action = ''; + } //var_dump($_POST); if (empty($mesg))