popup-bridge-android icon indicating copy to clipboard operation
popup-bridge-android copied to clipboard

Getting Values Back From PopUP Browser

Open susthitsoft opened this issue 5 years ago • 3 comments

General information

  • SDK/Library version: 28
  • Android Version and Device: Pixel Emulator with Android 6.0

Issue description

I am trying to integrate for Payment GateWays Other Than Paypal.

Example: Use RazaorPay Test Page https://susthitsoft.com/test.html

Earlier when I was using another webview show popups

Using onCreateWindows of WebChromeClient class WebView.WebViewTransport transport = (WebView.WebViewTransport) resultMsg.obj; transport.setWebView(newWebView); resultMsg.sendToTarget();

It seemed to be working.

However, this is'nt case with PopUpBridge

Any ideas is there is way to link WEbViewTransport to Browser window launched? Or am I missing something. If this works it could be a generic method for all payments gatways like Stripe etc.

Could you help ?

susthitsoft avatar Oct 23 '20 14:10 susthitsoft

Hi @susthitsoft can you provide more details / steps about what kind of use-cases you're looking to support?

sshropshire avatar Oct 23 '20 18:10 sshropshire

Idea is to support accepting payments (eg. Paypal/Stripe/RazorPay) without needing any special coding apart from just adding PopUpBridge.

Scenario: (Should work for any website or payment gateway)

  1. User opens webview based eCom Web app
  2. Adds products to cart
  3. Checkout Prompt
  4. Payment Window Opens in Browser Switch
  5. Payment received / cancelled -
  6. Popup Browser is closed (automatically) and user is sent back to webview

Seamless payments via WebView

Supporting acceptance of payments for various payment gateways for WebView based apps (without any javascript changes in the webpage as required by PopUpBridge - as it does'nt handle postMessages from new window back)

susthitsoft avatar Oct 24 '20 17:10 susthitsoft

@susthitsoft ok I understand the expected behavior. Are you observing different behavior in your use case for any of the steps? Or would this be an entirely new feature?

sshropshire avatar Oct 26 '20 14:10 sshropshire