From d36cf8b46cc9b562843012a4ebb8be698795cf1d Mon Sep 17 00:00:00 2001 From: Francis Whittle Date: Fri, 28 Jul 2023 12:06:36 +1000 Subject: [PATCH] CIVIEWAY-255 Match granularity of fillTokensMeta expiry date to existing --- CRM/eWAYRecurring/PaymentToken.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CRM/eWAYRecurring/PaymentToken.php b/CRM/eWAYRecurring/PaymentToken.php index 4b9c13c..6822189 100644 --- a/CRM/eWAYRecurring/PaymentToken.php +++ b/CRM/eWAYRecurring/PaymentToken.php @@ -353,9 +353,9 @@ public static function fillTokensMeta() { $card_number = $card_details->Number; - $expiry_date = new DateTime(); + $expiry_date = new DateTime('00:00:00.000'); $expiry_date->setDate(2000 + (int) $card_details->ExpiryYear, $card_details->ExpiryMonth, 1); - $expiry_date->modify('+ 1 month - 1 day'); + $expiry_date->modify('+ 1 month - 1 second'); $expiry_date = $expiry_date->format('Ymd');