cancel
Showing results for 
Search instead for 
Did you mean: 

Backend order redirect to login page

Backend order redirect to login page

Weird behavior only happen in Magento 2.3.6 to Magento 2.4.x but not in Magento 2.3.5p1 version.

We have a payment extension and we incorporate this extension also in backend ordering "admin/sales/order_create/index" and when we press Submit  we override that process by prioritizing to POST our payment via ajax and target an iframe as the destination of the result.

jQuery(form).attr("method", "POST");
jQuery(form).attr("target", "iframe_payment_result");

We do have a process to monitor that iframe and once we have the result we then fire the window.order._realSubmit() url="/admin/sales/order_create/save/key". We use addExcludedPaymentMethod to exclude our payment from this _realSubmit as we already handled it in separate process. The resulting behavior with M2.3.5p1 this redirect me to view "admin/sales/order/view/order_id/" which is correct BUT with M2.3.6 to M2.4.x this will redirect me to Login page "admin/admin/index/index/key/". This happen only in Firefox browser and working perfectly with Chrome and Edge. Any insight about this issue from experts is a big help.

 
Thanks.
-