From 4a6c98feafaf43164daad1d72c901dc25a0c535c Mon Sep 17 00:00:00 2001 From: Mike Date: Wed, 12 Jun 2019 23:08:50 -0500 Subject: [PATCH] fix: only grab first 5 digits of zip code if people enter a 9 digit zip code we only want to grab the first 5 --- Nixtus.Plugin.Payments.Nmi/NmiPaymentProcessor.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Nixtus.Plugin.Payments.Nmi/NmiPaymentProcessor.cs b/Nixtus.Plugin.Payments.Nmi/NmiPaymentProcessor.cs index e2b0cb8..8d2397a 100644 --- a/Nixtus.Plugin.Payments.Nmi/NmiPaymentProcessor.cs +++ b/Nixtus.Plugin.Payments.Nmi/NmiPaymentProcessor.cs @@ -114,7 +114,7 @@ public ProcessPaymentResult ProcessPayment(ProcessPaymentRequest processPaymentR { "address1", customer.BillingAddress.Address1 }, { "city", customer.BillingAddress.City }, { "state", customer.BillingAddress.StateProvince.Abbreviation }, - { "zip", customer.BillingAddress.ZipPostalCode }, + { "zip", customer.BillingAddress.ZipPostalCode.Substring(0, 5) }, { "payment_token", processPaymentRequest.CustomValues[Constants.CardToken].ToString() }, { "amount", processPaymentRequest.OrderTotal.ToString("0.00", CultureInfo.InvariantCulture) }, { "orderid", processPaymentRequest.OrderGuid.ToString() } @@ -377,7 +377,7 @@ public ProcessPaymentResult ProcessRecurringPayment(ProcessPaymentRequest proces { "address1", customer.BillingAddress.Address1 }, { "city", customer.BillingAddress.City }, { "state", customer.BillingAddress.StateProvince.Abbreviation }, - { "zip", customer.BillingAddress.ZipPostalCode }, + { "zip", customer.BillingAddress.ZipPostalCode.Substring(0, 5) }, { "payment_token", processPaymentRequest.CustomValues[Constants.CardToken].ToString() }, { "amount", orderTotal }, { "orderid", processPaymentRequest.OrderGuid.ToString() }