diff --git a/Nixtus.Plugin.Payments.Nmi/Components/NmiViewComponent.cs b/Nixtus.Plugin.Payments.Nmi/Components/NmiViewComponent.cs index 9bdf202..f6a1110 100644 --- a/Nixtus.Plugin.Payments.Nmi/Components/NmiViewComponent.cs +++ b/Nixtus.Plugin.Payments.Nmi/Components/NmiViewComponent.cs @@ -75,7 +75,7 @@ private void PopulateStoredCards(PaymentInfoModel model) if (response.IsSuccessStatusCode) { var nmiQueryResponse = DeserializeXml(response.Content.ReadAsStringAsync().Result); - if (nmiQueryResponse != null) + if (nmiQueryResponse?.CustomerVault != null) { foreach (var billing in nmiQueryResponse.CustomerVault.Customer.Billing ?? new List()) { @@ -88,6 +88,10 @@ private void PopulateStoredCards(PaymentInfoModel model) }); } } + else + { + _logger.Information("No saved cards where found in the response from NMI"); + } } } diff --git a/Nixtus.Plugin.Payments.Nmi/NmiPaymentProcessor.cs b/Nixtus.Plugin.Payments.Nmi/NmiPaymentProcessor.cs index a4a7379..b979c66 100644 --- a/Nixtus.Plugin.Payments.Nmi/NmiPaymentProcessor.cs +++ b/Nixtus.Plugin.Payments.Nmi/NmiPaymentProcessor.cs @@ -710,7 +710,7 @@ public override void Install() _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.Nmi.Fields.Password", "Password"); _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.Nmi.Fields.Password.Hint", "Password assigned to the merchant account"); _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.Nmi.Fields.SecurityKey", "Security Key"); - _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.Nmi.Fields.SecurityKey.Hint", "API security key assigned to the merchant account, using this combined with username/password will result in an error"); + _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.Nmi.Fields.SecurityKey.Hint", "API security key assigned to the merchant account, using this combined with username/password will result in an error. If you want to save cards, then select that checkbox and enter username/password"); _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.Nmi.Fields.CollectJsTokenizationKey", "Collect JS Tokenization Key"); _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.Nmi.Fields.CollectJsTokenizationKey.Hint", "Tokenization key used for Collect.js library"); _localizationService.AddOrUpdatePluginLocaleResource("Plugins.Payments.Nmi.Fields.TransactModeValues", "Transaction mode");