1

As the title stated. I'm developing an app that allows you to make payment through a 3rd party payment gateway. The payment gateway support 2 payment types: credit card and direct debit.

I'm currently using iframe and it works fine if the payment method is credit card. The problem is with the direct debit, since user needed to sign in to another 3rd party banking portal, it forced ionic to open a platform's browser popup. I want to be at least navigate the iframe instead of opening a popup. I tried many ways to intercept the popup but failed. The only way I can stop the popup is using iframe's sandbox like so:

<iframe src="https://someurl.lol" sandbox="allow-forms allow-same-origin allow-scripts"></iframe>

but with this, I can't do anything else, the page doesn't even navigate.

So is it possible to embed another webview inside the ionic webview? Or another possible solution is to navigate the iframe instead of opening the popup; basically intercepting the iframe's window.open() instead of blocking.

Peter Haddad
  • 78,874
  • 25
  • 140
  • 134
Irman Ahmad
  • 182
  • 3
  • 12

1 Answers1

1

I think you need cordova's inappbrowser. I used it to implement braintree payment system. The app opens the browser without the link shown or any controls. You can also interact the the inappbrowser from your main app (I used polling) to check if the user is done with the actions so you can close it automatically.

https://github.com/apache/cordova-plugin-inappbrowser

Denko Mancheski
  • 2,709
  • 2
  • 18
  • 26
  • I've tried inappbrowser before, IIRC the same thing happened. Means it launched an external default browser to navigate to the 3rd(4th?) party banking. – Irman Ahmad Apr 23 '16 at 05:56
  • @IrmanAhmad I also have a requirement like this. I want user to navigate the URL in a particular section without opening a browser. Worst part is, I am not even able to get the URL page in a container or iframe. Forget navigating. Did you find any solution? Need help here. – Sagar Kulkarni Feb 02 '17 at 12:34