Nop40: How to redirect in PaymentProcessor.PostProcessPayment(PostProcessPaymentRequest postProcessPaymentRequest)

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
6 years ago
In the previous versions of NopCommerce I was able to redirect the customer to the third-party payment url using the following code:

HttpContext.Response.Redirect("http://externalpayment...");

How should this redirecting be done in nopCommerce 4.0 as HttpContext is no longer available in the PaYmentProcessor class
6 years ago
Found it:

HttpContext is now available from IHttpContextAccessor (DI)        

private readonly IHttpContextAccessor _httpContextAccessor;
4 years ago
I am not able to redirect with this. It redirects to the cart page.
4 years ago
arijit.de wrote:
I am not able to redirect with this. It redirects to the cart page.



Which version are you using ?

Did you find any log ?
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.