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 ...@@ -235,7 +235,11 @@ class PaymentController extends AbstractController
foreach ($recurringPayments as $payment) { foreach ($recurringPayments as $payment) {
//Just look for one valid 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 ( if (
GetHumanStatus::STATUS_CAPTURED == $new_status GetHumanStatus::STATUS_CAPTURED == $new_status
|| GetHumanStatus::STATUS_AUTHORIZED == $new_status || GetHumanStatus::STATUS_AUTHORIZED == $new_status
......
...@@ -62,6 +62,8 @@ class TAVCotisationUtils ...@@ -62,6 +62,8 @@ class TAVCotisationUtils
$p->getStatus() !== GetHumanStatus::STATUS_FAILED $p->getStatus() !== GetHumanStatus::STATUS_FAILED
&& $p->getStatus() !== GetHumanStatus::STATUS_CANCELED && $p->getStatus() !== GetHumanStatus::STATUS_CANCELED
&& $p->getStatus() !== GetHumanStatus::STATUS_EXPIRED && $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 //Everytime payzen sends a recurring payment notification, notification is
//caught by notifyRecurringPaymentAction, which does not update payment status. //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