From 9cc04a61335bd69d5dbc4d0bce90cff6317947e5 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Wed, 22 Apr 2026 15:06:04 -0400 Subject: [PATCH] added check for old expiry upon date entry. --- Controllers/PaymentController.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Controllers/PaymentController.cs b/Controllers/PaymentController.cs index e3a9566..f2bc74d 100644 --- a/Controllers/PaymentController.cs +++ b/Controllers/PaymentController.cs @@ -249,6 +249,13 @@ CCRETRY: CI_N.EMAIL.ToLower().Trim() == tCI.EMAIL.ToLower().Trim() )) { + if (tCI.EXPIRY.Ticks > CI_N.EXPIRY.Ticks) { + //had to be added in case they send a duplicate card #, but provide old expiry date. + //so skip saving if the current expiry is greater than the one provided. + goto SKIP_REENTER; + } + + CI_N.UID = tCI.UID; CI_N.LNAME = tCI.LNAME; @@ -256,6 +263,8 @@ CCRETRY: goto CCRETRY; } +SKIP_REENTER: + D += "-" + tCI.UID; B = "Attempted to Add duplicate Credit Card from WEB.

Details (OLD | NEW):
Ref: " + CI_N.REF_NUM + "
USE: " + tCI.UID + "
CVNUM: " + tCI.CUST_UID + " | " + CI_N.CUST_UID + "
FNAME: " + tCI.FNAME + " | " + CI_N.FNAME + "
LNAME: " + tCI.LNAME + " | " + CI_N.LNAME + "
PHONE: " + tCI.PHONE + " | " + CI_N.PHONE + "
EMAIL: " + tCI.EMAIL + " | " + CI_N.EMAIL + "
LAST5: " + tCI.LAST5 + " | " + CI_N.LAST5 + "
EXPIRY: " + tCI.EXPIRY.ToString("MM / yyyy") + " | " + CI_N.EXPIRY.ToString("MM / yyyy") + "
CVV (NEW ONLY): " + CI_N.SD; S = " Duplicate CC received for Ref Num: " + CI_N.REF_NUM + " Use Card: " + tCI.UID;