Skip to content

Commit

Permalink
fix: dont save custom values on orders
Browse files Browse the repository at this point in the history
  • Loading branch information
mewajda committed Aug 7, 2019
1 parent 7c8dfbe commit 7924d09
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Nixtus.Plugin.Payments.Nmi/NmiPaymentProcessor.cs
Expand Up @@ -219,6 +219,10 @@ public ProcessPaymentResult ProcessPayment(ProcessPaymentRequest processPaymentR
{
_genericAttributeService.SaveAttribute(customer, Constants.CustomerVaultIdKey, customer.CustomerGuid.ToString());
}

// remove custom values so that they don't get saved on the order and also won't display
// on the generated PDF
processPaymentRequest.CustomValues = new Dictionary<string, object>();
}
// transaction declined or error - responseValue = 2 or 3
else
Expand Down Expand Up @@ -525,6 +529,10 @@ public ProcessPaymentResult ProcessRecurringPayment(ProcessPaymentRequest proces
{
_genericAttributeService.SaveAttribute(customer, Constants.CustomerVaultIdKey, customer.CustomerGuid.ToString());
}

// remove custom values so that they don't get saved on the order and also won't display
// on the generated PDF
processPaymentRequest.CustomValues = new Dictionary<string, object>();
}
// transaction declined or error - responseValue = 2 or 3
else
Expand Down

0 comments on commit 7924d09

Please sign in to comment.