Update paymentok.php

This commit is contained in:
Laurent Destailleur 2021-04-27 19:46:26 +02:00 committed by GitHub
parent db92de2a22
commit e6d2bad6e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -394,7 +394,7 @@ if ($ispaymentok) {
// Do action only if $FinalPaymentAmt is set (session variable is cleaned after this page to avoid duplicate actions when page is POST a second time)
if (!empty($FinalPaymentAmt) && $paymentTypeId > 0) {
$result = $object->status < $object::STATUS_DRAFT ? -1 : $object->validate($user); // if membre is excluded (status == -2) the new validation is not possible
$result = ($object->status == $object::STATUS_EXCLUDED) ? -1 : $object->validate($user); // if membre is excluded (status == -2) the new validation is not possible
if ($result < 0 || empty($object->datevalid)) {
$error++;
$errmsg = $object->error;