In the Klarna addon, the standard way of handling an error thrown by
klarnaCheckout.ValidateKcoOrder(order => _paymentWidgetConfigV3.ValidateCheckoutOrder(order, this), Request, Response);
is by sending the user to a generic error page.
“RedirectToUrlOnValidationFailure = controller.Url.Action(“Error”, “Error”)”
But do you have any idea of how to solve a redirect back to the checkout with a correct error message?
Redirecting back to the checkout is no problem, but to also show the correct error message is harder. And it becomes even harder when you have multiple servers and a loadbalancer.
I tried a query parameter now on this “RedirectToUrlOnValidationFailure”, seems to work. Might not be the best?
Litium version: 5/6/7