dpa99c / cordova-plugin-inappbrowser-popup-bridge

A fork of cordova-plugin-inappbrowser which adds Braintree's PopupBridge functionality to support PayPal payments
Apache License 2.0
22 stars 18 forks source link

Google Pay integration? #11

Closed SamuelMichelRiad closed 2 years ago

SamuelMichelRiad commented 2 years ago

Has anyone been able to use this plugin for Google Pay payments? As far as I understand, Google Pay also requires the ability to open popups to perform the payment.

dpa99c commented 2 years ago

This solution is specifically for PayPal and requires the Braintree JS SDK to be present in the web page loaded into the WebView. It will not work as a generic solution for other payment systems such as Google Pay.

SamuelMichelRiad commented 2 years ago

@dpa99c, thanks for your reply. Would you have any general suggestions on how to go about enabling generic popups from IAB?

dpa99c commented 2 years ago

AFAIK there's no generic solution - WebViews (as used by Cordova's IAB) do not support popup windows since they are a feature of a full browser. If possible, I'd would open the page in the system browser which does support popup windows.

SamuelMichelRiad commented 2 years ago

Thanks again - I've already tried opening the payment page in the system browser (through IAB, using _system as the target), and the payment page does indeed work as expected, however my app either hangs or restarts when I bring it to the foreground again :(