Project 'cooperatic/kohinos-tav' was moved to 'agplv3/kohinos-tav'. Please update any links and bookmarks that may still have the old path.
Commit aa82db6b by Yvon Kerdoncuff

Merge branch…

Merge branch '6262-ne-pas-prendre-en-compte-les-paiements-recurrents-sans-vads-identifier' into 'develop'

discard payments without vads_identifier, take into account payment lines…

See merge request cooperatic/kohinos-tav!86
parents 7a12ca10 1e085679
......@@ -235,7 +235,11 @@ class PaymentController extends AbstractController
foreach ($recurringPayments as $payment) {
//Just look for one valid payment.
if ($payment->getDetails()['vads_identifier'] == $vads_identifier) {
if (
$payment->getDetails()
&& array_key_exists('vads_identifier', $payment->getDetails())
&& $payment->getDetails()['vads_identifier'] == $vads_identifier
) {
if (
GetHumanStatus::STATUS_CAPTURED == $new_status
|| GetHumanStatus::STATUS_AUTHORIZED == $new_status
......
......@@ -62,6 +62,8 @@ class TAVCotisationUtils
$p->getStatus() !== GetHumanStatus::STATUS_FAILED
&& $p->getStatus() !== GetHumanStatus::STATUS_CANCELED
&& $p->getStatus() !== GetHumanStatus::STATUS_EXPIRED
&& $p->details
&& array_key_exists('vads_identifier',$p->details) //some payment without vads_identifier have status NEW but are not real recurring payments
) {
//Everytime payzen sends a recurring payment notification, notification is
//caught by notifyRecurringPaymentAction, which does not update payment status.
......
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