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

Merge branch 'fix-error-msg-text' into 'ssa-gironde'

fix recurring payment error message: amount

See merge request cooperatic/kohinos-tav!107
parents 834b5565 57587e00
......@@ -225,13 +225,14 @@ class Payment extends BasePayment
$paymentEndDateDueToExpiry->setDate($this->details['vads_expiry_year'], $this->details['vads_expiry_month'], $day + 1);
$now = new DateTime();
$recurrenceAmount = $this->recurrenceAmount / 100;
if ($paymentEndDate && $paymentEndDate < $paymentEndDateDueToExpiry) {
//Compare now with payment end date
$reason = "Paiement récurrent en cours de " . $this->recurrenceAmount . "€ jusqu'à dernière échéance le " . $paymentEndDate->format('d/m/Y') . ".";
$reason = "Paiement récurrent en cours de " . $recurrenceAmount . "€ jusqu'à dernière échéance le " . $paymentEndDate->format('d/m/Y') . ".";
return $now >= $paymentEndDate;
} else {
//Compare now with expiry date
$reason = "Paiement récurrent en cours de " . $this->recurrenceAmount . "€ jusqu'à dernière échéance le " . $paymentEndDateDueToExpiry->format('d/m/Y') . " en raison de l'expiration du moyen de paiement.";
$reason = "Paiement récurrent en cours de " . $recurrenceAmount . "€ jusqu'à dernière échéance le " . $paymentEndDateDueToExpiry->format('d/m/Y') . " en raison de l'expiration du moyen de paiement.";
return $now >= $paymentEndDateDueToExpiry;
}
}
......
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