question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Webview showing not secure popup when making a payment

See original GitHub issue

Bug description:

The payment method of website show me the browser not secure popup when I making a payment. After I press Pay with Afterpay button in checkout page, it shown Don't see the secure payment browser? popup like image below, then reload the web.

It works on website browser, but not in RNWebView. Actually, When I pressed Pay with Afterpay on Website browser, it open a new tab with about:blank url, then redirect to Afterpay payment.

At first I tested on 11.0.0 version, then I upgrade to 11.14.3 but same issue.

Here is my WebView code:

const onShouldStartLoadWithRequest = ({ url }) => {
  if (
    url &&
    url.split("://")[0] !== "http" &&
    url.split("://")[0] !== "https"
  ) {
    if (isIOS) {
      Linking.openURL(url);
      return false;
    }
  }
  return true;
};

<WebView
  source={{uri: 'https://www.ebay.com.au'}}
  bounces={false}
  originWhitelist={["*"]}
  startInLoadingState={true}
  onShouldStartLoadWithRequest={onShouldStartLoadWithRequest}
  automaticallyAdjustContentInsets={false}
  domStorageEnabled={false}
  javaScriptEnabled={false}
  enableApplePay
  userAgent="Mozilla/5.0 (iPhone; CPU iPhone OS 14_0_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0 Mobile/15E148 Safari/604.1"
  sharedCookiesEnabled
/>

To Reproduce:

  1. Create app that uses WebView
  2. Go to https://www.ebay.com.au and pick any product then make all the checkout process until the Payment method.
  3. Select Afterpay method then press Pay with Afterpay button

New Project (1)

Expected behavior:

After pressing Pay with Afterpay, should show the popup process of Afterpay then continue to complete the payment.

Environment:

  • OS: iOS
  • OS version: iOS 15.0
  • react-native version: 0.64.2
  • react-native-webview version: 11.14.3

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8

github_iconTop GitHub Comments

4reactions
Tech-LRcommented, Aug 24, 2022

+1

0reactions
lonewolfaka9commented, Jul 3, 2022

+1

Read more comments on GitHub >

github_iconTop Results From Across the Web

Popups Do Not Appear In React Native WebView (PayUMoney)
Any payment solution for security purposes using popup browser cannot be used with react-native-webview . It most often is result of design ......
Read more >
Open javascript popup in WKWebView? - Apple Developer
I have a WKWebView in my app which opens a page where there is a button that uses javascript to open another page...
Read more >
Managing WebView objects - Android Developers
This page describes how to use these APIs to work with WebView objects more effectively, improving your app's stability and security. Version ...
Read more >
Here's how to fix those mysterious Android WebView crashes
To use WatfordHert's method, go to the main Android Settings menu, then tap "Apps & Notifications" (just "Applications" on some phones). Find ...
Read more >
Are Web Views in android secure?
Are you sure apps have access to our password store? (I'm not talking about other apps, but the currently open apps that pop...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found