diff --git a/src/Smartstore.Modules/Smartstore.PayPal/Controllers/PayPalController.cs b/src/Smartstore.Modules/Smartstore.PayPal/Controllers/PayPalController.cs index 561861cf2d..8c6b5696e8 100644 --- a/src/Smartstore.Modules/Smartstore.PayPal/Controllers/PayPalController.cs +++ b/src/Smartstore.Modules/Smartstore.PayPal/Controllers/PayPalController.cs @@ -488,9 +488,11 @@ private async Task HandleCaptureAsync(Order order, WebhookResource resource) break; case "declined": - order.CaptureTransactionResult = status; - order.PaymentStatus = PaymentStatus.Voided; - await _orderProcessingService.VoidOfflineAsync(order); + if (order.CanVoidOffline()) + { + order.CaptureTransactionResult = status; + await _orderProcessingService.VoidOfflineAsync(order); + } break; case "refunded":