Hi, I'm getting the same error. When I try and checkout using the PayPoint plugin, I get a blank page and an error in my Log table:
"Cannot redirect after HTTP headers have been sent."
Stepping through the code, it falls through OpcCompleteRedirectionPayment
action within the CheckoutController
This then gets down to _paymentService.PostProcessPayment(postProcessPaymentRequest);
This falls through to the PostProcessPayment
method within the PayPointPaymentProcessor.cs
file which builds a RemotePost
and is meant to POST away to PayPoint.
Stepping through the RemotePost.Post()
method, it builds up the HTML form and ends with a _httpContext.Response.End()
however, it is then continuing back to the CheckoutController
and doing the 2.50 fix:
//redirection has been done in PostProcessPayment
//if no redirection has been done (to a third-party payment page)
//theoretically it's not possible
so it's falling through the RedirectToRoute, causing the Log error.
Shouldn't it not even reach that point? It doesn't appear to be doing the POST at all.