nopSolutions/nopCommerce · critical · NopException
Plugin not configured
Error message
Plugin not configured
What it means
Thrown in GetOrderAsync when IsConfigured(settings) returns false, meaning the PayPal Commerce plugin lacks the required ClientId and SecretKey. Without these credentials, no API call to PayPal can be made to retrieve order information.
Source
Thrown at src/Plugins/Nop.Plugin.Payments.PayPalCommerce/Services/PayPalCommerceServiceManager.cs:1521
#endregion
#region Orders
/// <summary>
/// Get the order by id
/// </summary>
/// <param name="settings">Plugin settings</param>
/// <param name="orderId">Order id</param>
/// <returns>
/// A task that represents the asynchronous operation
/// The task result contains the order; error message if exists
/// </returns>
public async Task<(Order Order, string Error)> GetOrderAsync(PayPalCommerceSettings settings, string orderId)
{
return await HandleFunctionAsync(async () =>
{
if (!IsConfigured(settings))
throw new NopException("Plugin not configured");
var paymentRequest = await _orderProcessingService.GetProcessPaymentRequestAsync()
?? throw new NopException("Order payment info not found");
var orderIdKey = await _localizationService.GetResourceAsync("Plugins.Payments.PayPalCommerce.Order.Id");
if (!paymentRequest.CustomValues.TryGetValue(orderIdKey, out var orderIdValue) ||
!string.Equals(orderIdValue.Value, orderId, StringComparison.InvariantCultureIgnoreCase))
throw new NopException("Failed to get PayPal order info");
var placementKey = await _localizationService.GetResourceAsync("Plugins.Payments.PayPalCommerce.Order.Placement");
if (!paymentRequest.CustomValues.TryGetValue(placementKey, out var placementValue) ||
!Enum.TryParse<ButtonPlacement>(placementValue.Value, out var placement))
{
throw new NopException("Failed to get PayPal order info");
}
var order = await _httpClient.RequestAsync<GetOrderRequest, GetOrderResponse>(new GetOrderRequest { OrderId = orderId }, settings);
View on GitHub (pinned to 64bdf2ff08)
Solutions
- Complete plugin configuration by entering ClientId and SecretKey in the PayPal Commerce plugin settings
- Run the PayPal onboarding flow to obtain and store credentials automatically
- Verify credentials are persisted correctly by checking the plugin settings in the database
- Ensure configuration is not environment-specific and missing in the current deployment
Defensive patterns
Strategy: validation
Validate before calling
// Verify plugin configuration before order operations
if (!PayPalCommerceServiceManager.IsConfigured(settings))
{
_logger.Warning("PayPal Commerce plugin not configured");
return Error("Payment method not available");
} Type guard
static bool IsPluginReady(PayPalCommerceSettings settings)
=> !string.IsNullOrEmpty(settings?.ClientId)
&& !string.IsNullOrEmpty(settings.SecretKey); Try / catch
var (order, error) = await manager.GetOrderAsync(settings, orderId);
if (!string.IsNullOrEmpty(error) && error == "Plugin not configured")
return View("PluginConfigurationRequired"); Prevention
- Complete PayPal onboarding before activating the payment method on the storefront
- Hide PayPal Commerce from customers until IsConfigured returns true
- Include credential validation in deployment verification
When it happens
Trigger: GetOrderAsync is called and IsConfigured(settings) returns false because settings.ClientId or settings.SecretKey (or both) are null or empty.
Common situations: Plugin was installed but never configured with PayPal API credentials; credentials were cleared during a settings reset; environment-specific configuration (dev/staging/prod) has missing credentials; onboarding was incomplete and credentials were never persisted.
Related errors
- Merchant PayPal ID not set
- No available shipping options
- Vault disabled
- Client ID is not set
- Client secret is not set
AI-assisted analysis of nopSolutions/nopCommerce@64bdf2ff08 (2026-08-13).
Data as JSON: /api/errors/5c859ad070227ec8.
Report an issue: GitHub.