Payment Plugin With 3rd Party redirection Troubles

4 years ago
Hi,

I'm developing a payement plugin. Everything is ok, till i try to redirect to Payment Gateway.
I've got a redirect url like : http://localhost/checkout/URLOFTHIRDParty

Any help?

10x at advance.
4 years ago
I've found the solution.
That was using URL.Encode method that causes the error.
I've just used simple URL without encoding and it works.
5 months ago
I am having trouble with redirecting to 3rd Party URL. It redirects to the cart url. Cant figure out why?

My code :

            

public void PostProcessPayment(PostProcessPaymentRequest postProcessPaymentRequest)
{

             var baseUrl = "https://example.com"
            _httpContextAccessor.HttpContext.Response.Redirect(baseUrl);

}

I would appreciate if anyone can help me.
5 months ago
How did you go ?
I add the code above to the top of the PayPalStandard Plugin (with a semicolon added ) as a test and it worked fine

        public void PostProcessPayment(PostProcessPaymentRequest postProcessPaymentRequest)
        {

            var baseUrl = "https://example.com";
            _httpContextAccessor.HttpContext.Response.Redirect(baseUrl);
            return;