Skip to content

Commit

Permalink
fix: only grab first 5 digits of zip code
Browse files Browse the repository at this point in the history
if people enter a 9 digit zip code we only want to grab the first 5
  • Loading branch information
mewajda committed Jun 13, 2019
1 parent 860ae10 commit 4a6c98f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Nixtus.Plugin.Payments.Nmi/NmiPaymentProcessor.cs
Expand Up @@ -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() }
Expand Down Expand Up @@ -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() }
Expand Down

0 comments on commit 4a6c98f

Please sign in to comment.