I have an Sitecore app (9.0.2)
MVC
application, in which I send to the Controller a FormCollection
object, with an Ajax
call (because I create dynamically tabs with in View).
On the Controller, I have a redirect to a payment service:
WebUtil.Redirect(new RealExService().RedirectPost(postData, Sitecore.Configuration.Settings.GetSetting("realexurl","https://pay.realexpayments.com/pay")).AbsoluteUri);
(...)
return View("~/Views/Complete.cshtml", viewModel);
The issue is that when the redirect happens, Request Method automatically changes to OPTIONS and thus I get a status code of 403 and the payment form is not shown.
I have switched the POST
request from AJAX
call to MVC
form submit and it works as expected. (with the price of losing dynamic content on the View)
Any ideas?
Thank you.
RedirectAction
? that's how you're supposed to redirect from controller actions – Mark Cassidy♦ Jun 11 '19 at 9:46