کدهای زیر را که با new// کامنت شده اند را به کد پلاگین درگاه اضافه کنید:
using Nop.Services.Customers; //new
...
private readonly ICustomerService _CustomerService; //new
...
ICustomerService CustomerService //new
...
this._CustomerService = CustomerService; //new
...
if (_orderProcessingService.CanMarkOrderAsPaid(order))
{
order.AuthorizationTransactionId = refId;
_workContext.CurrentCustomer = _CustomerService.GetCustomerById(order.CustomerId); //new
_orderService.UpdateOrder(order);
_orderProcessingService.MarkOrderAsPaid(order);
return RedirectToRoute("CheckoutCompleted", new { orderId = order.Id });
}