Can payment be done in pop-up rather than using redirect?
If your gateway tells you to redirect, you redirect. 
If you need a modal-based gateway, choose another gateway.
Changing the flow recommended by your gateway puts you firmly in unsupported waters, and definitely exposes you to additional risk.
This is especially true since redirected gateways require PCI A compliance, while modals require the slightly more complex PCI A-EP compliance.

I would also expect most gateways to have protection against this.