Version: 4.1
In previous versions of nopCommerce (3.8 was the last version we used), you were able to issue multiple partial refunds to the same order.
However, this is not working in 4.1. We believe we have traced it to an issue in the CanRefund method (code snippet pasted below). The problem is with line if (order.RefundedAmount > decimal.Zero). It results in any order that's been partially refunded returning that you can't issue another partial refund again. Given what the note says and that this worked in previous versions, this seems to be a bug.
public virtual bool CanRefund(Order order)
{
if (order == null)
throw new ArgumentNullException(nameof(order));
if (order.OrderTotal == decimal.Zero)
return false;
//refund cannot be made if previously a partial refund has been already done. only other partial refund can be made in this case
if (order.RefundedAmount > decimal.Zero)
return false;
//uncomment the lines below in order to disallow this operation for cancelled orders
//if (order.OrderStatus == OrderStatus.Cancelled)
// return false;
if (order.PaymentStatus == PaymentStatus.Paid &&
_paymentService.SupportRefund(order.PaymentMethodSystemName))
return true;
return false;
}