0

I am creating a cardcom payment method for magento 2.1. Everything is working fine but when i try to do payment in iframe mode , then the checkout/onepage/success page gets loaded within the iframe. what i have done in iframe is :-

$formHTML .='<iframe name="my_iframe" target="_parent" id="my_iframe" src="'.$this->getCardcomUrl()."&lowprofilecode=".$fields["profile"].'" scrolling="no" width="100%" height="1124px" style="border:0px"></iframe>';

Thus it looks something like shown in image below. Any help will be appreciated. Thanks in advance.

enter image description here

  • Please check value of $this->getCardcomUrl() – Amit Bera Apr 13 '17 at 14:58
0

Actually the problem was that, when page was redirected from cardcom server it was loading complete page within iframe. Thus, finally what i did is, after the page is redirected from cardcom server ,i redirected it again to checkout/onepage/success using javascript:-

window.top.location.href="www.xyx.com";

And i also added a flag in iframe allow-top-navigation.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy