Commit 57587e00 by Damien Moulard

fix recurring payment error message: amount

parent 8225c2b7
...@@ -225,13 +225,14 @@ class Payment extends BasePayment ...@@ -225,13 +225,14 @@ class Payment extends BasePayment
$paymentEndDateDueToExpiry->setDate($this->details['vads_expiry_year'], $this->details['vads_expiry_month'], $day + 1); $paymentEndDateDueToExpiry->setDate($this->details['vads_expiry_year'], $this->details['vads_expiry_month'], $day + 1);
$now = new DateTime(); $now = new DateTime();
$recurrenceAmount = $this->recurrenceAmount / 100;
if ($paymentEndDate && $paymentEndDate < $paymentEndDateDueToExpiry) { if ($paymentEndDate && $paymentEndDate < $paymentEndDateDueToExpiry) {
//Compare now with payment end date //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; return $now >= $paymentEndDate;
} else { } else {
//Compare now with expiry date //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; 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