Commit 3851052d by Yvon

when checking existence of recurring payments, do not take into account failed ones

parent 85a9eecd
......@@ -10,6 +10,7 @@ use App\Entity\CotisationTavReversement;
use App\Entity\CotisationTavPrelevement;
use App\Enum\MoyenEnum;
use App\Utils\CustomEntityManager;
use Payum\Core\Request\GetHumanStatus;
use Symfony\Component\Security\Core\Security;
class TAVCotisationUtils
......@@ -54,11 +55,13 @@ class TAVCotisationUtils
$res = "";
foreach($recurringPayments as $p) {
if ($p->getStatus() !== GetHumanStatus::STATUS_FAILED) { //filter out failed payments
$reason = "";
if($p->isRecurringPaymentEndedOrExpired($reason) !== true) {
$res .= ($reason . " ");
}
}
}
return $res;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment