Fixes payment flow for both iframe and PayPal paths.