nopSolutions/nopCommerce · error · NopException
Payment method is not active
Error message
Payment method is not active
What it means
Thrown after the payment plugin instance was successfully loaded but _paymentPluginManager.IsPluginActive returns false. nopCommerce refuses to process payment through a plugin the store administrator has disabled, even if the customer's session still references it.
Source
Thrown at src/Libraries/Nop.Services/Orders/OrderProcessingService.cs:1409
/// <returns>
/// A task that represents the asynchronous operation
/// The task result contains the
/// </returns>
protected virtual async Task<ProcessPaymentResult> GetProcessPaymentResultAsync(ProcessPaymentRequest processPaymentRequest, PlaceOrderContainer details)
{
//process payment
ProcessPaymentResult processPaymentResult;
//check if is payment workflow required
if (await IsPaymentWorkflowRequiredAsync(details.Cart))
{
var customer = await _customerService.GetCustomerByIdAsync(processPaymentRequest.CustomerId);
var paymentMethod = await _paymentPluginManager
.LoadPluginBySystemNameAsync(processPaymentRequest.PaymentMethodSystemName, customer, processPaymentRequest.StoreId)
?? throw new NopException("Payment method couldn't be loaded");
//ensure that payment method is active
if (!_paymentPluginManager.IsPluginActive(paymentMethod))
throw new NopException("Payment method is not active");
if (details.IsRecurringShoppingCart)
{
//recurring cart
processPaymentResult = (await _paymentService.GetRecurringPaymentTypeAsync(processPaymentRequest.PaymentMethodSystemName)) switch
{
RecurringPaymentType.NotSupported => throw new NopException("Recurring payments are not supported by selected payment method"),
RecurringPaymentType.Manual or
RecurringPaymentType.Automatic => await _paymentService.ProcessRecurringPaymentAsync(processPaymentRequest),
_ => throw new NopException("Not supported recurring payment type"),
};
}
else
//standard cart
processPaymentResult = await _paymentService.ProcessPaymentAsync(processPaymentRequest);
}
else
//payment is not required
View on GitHub (pinned to 64bdf2ff08)
Solutions
- Re-enable the payment method in Admin > Configuration > Payment methods (and limit to the correct stores if multi-store).
- Before checkout, filter the customer's selectable payment methods through GetActivePluginsAsync so they cannot pick an inactive one.
- Invalidate the customer's stored payment method choice when the active set changes.
Example fix
// before
processPaymentRequest.PaymentMethodSystemName = customer.SelectedPaymentMethodSystemName;
// after
var active = await _paymentPluginManager.LoadActivePluginsAsync(customer, storeId);
if (!active.Any(p => p.PluginDescriptor.SystemName == customer.SelectedPaymentMethodSystemName))
return Error("Selected payment method is no longer available.");
processPaymentRequest.PaymentMethodSystemName = customer.SelectedPaymentMethodSystemName; Defensive patterns
Strategy: validation
Validate before calling
var active = (await _paymentPluginManager.LoadActivePluginsAsync(customer, storeId))
.Select(p => p.PluginDescriptor.SystemName)
.ToHashSet();
if (!active.Contains(processPaymentRequest.PaymentMethodSystemName))
return Error("Selected payment method is not active.");
await _orderProcessingService.PlaceOrderAsync(processPaymentRequest, details); Type guard
async Task<bool> IsPaymentMethodActiveAsync(string systemName, Customer customer, int storeId)
{
var pm = await _paymentPluginManager.LoadPluginBySystemNameAsync(systemName, customer, storeId);
return pm is not null && _paymentPluginManager.IsPluginActive(pm);
} Try / catch
try
{
await _orderProcessingService.PlaceOrderAsync(processPaymentRequest, details);
}
catch (NopException ex) when (ex.Message == "Payment method is not active")
{
// refresh payment options and ask customer to reselect
return RedirectToAction("PaymentMethod");
} Prevention
- Filter checkout payment options through LoadActivePluginsAsync so inactive methods never appear selectable.
- When an admin disables a payment method, invalidate active checkout sessions that reference it.
- In multi-store setups, verify the method is active for the specific StoreId.
When it happens
Trigger: An admin disabled/deactivated the payment method in Configuration > Payment methods while customers had active checkouts using it. Also happens in multi-store configs where the method is active in one store but the order is being placed against a store where it is inactive.
Common situations: Maintenance window where payment methods were toggled; A/B testing payment options; store migration leaving the method inactive in the destination store; sandbox/live toggle where the live plugin was disabled.
Related errors
- Payment method couldn't be loaded
- Recurring payments are not supported by selected payment met
- Not supported recurring payment type
- Payment method couldn't be loaded
- Selected payment method can't be parsed
AI-assisted analysis of nopSolutions/nopCommerce@64bdf2ff08 (2026-08-13).
Data as JSON: /api/errors/a284e2ab42983047.
Report an issue: GitHub.