Hi so I am receiving mixed content errors when trying to display a card details form on my checkout page of my Symfony/Sylius app. I am using payum w/ omnipay bridge to do a sage pay checkout.
The reason I get the mixed content error is because I submit a form on my parent page which sends a token to the following route:
payum_capture_do:
path: /payment/capture/{payum_token}
defaults: { _controller: sylius.controller.payum.capture:doAction }
# schemes: [https]
route which in turn executes some code to get the iFrame src. The response is then fed into the iFrame src. This is actually all done via JS by submitting the form directly to the iFrame:
let form = jQuery("form[name='sylius_checkout_complete']");
if (form.length) {
form.attr('target', 'card-details');
form.submit();
}
The problem then arises because the payum route is not an https route and therefore the iFrame is blocked from showing content due a mixed content error. The reason this bug is so strange is because if I force the route to https (as you can see I've tried from the comment), it returns with "Too Many Redirects" and crashes the page (although it does display in the iFrame). I think this is because it tries http first then https and since the payment can only be captured once becomes invalid in doing so.
Any help would be greatly appreciated.