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;