Kotlin: getting OR_BIBED_15 error for Google Pay in webview

Google Pay button is displayed in webview using embedded checkout Embedded checkout - Payment API reference .

When submitting it, getting OR_BIBED_15 error

Here is webview implementation:

"""<!DOCTYPE html>
                        <html>
                        <head>
                          <meta charset="UTF-8">
                          <meta name="viewport" content="width=device-width">
                          <title>Flitt Checkout</title>
                        
                          <!-- External CSS -->
                          <link rel="stylesheet" href="https://pay.flitt.com/latest/checkout-vue/checkout.css">
                        
                          <!-- Flitt Embedded Checkout Script -->
                          <script src="https://pay.flitt.com/latest/checkout-vue/checkout.js"></script>
                        </head>
                        <body>
                        
                          <div id="checkout-container"></div>
                        
                          <script>
                            const Options = {
                              options: {
                                methods: ['card','wallets',],
                                methods_disabled: [],
                                card_icons: ['mastercard', 'visa', 'maestro'],
                                wallet_methods_enabled: ["google"],
                                fields: false,
                                active_tab: "card",
                                full_screen: false,
                                button: true,
                                hide_title: true,
                                hide_link: true,    
                                email: false,
                                theme: {
                                  type: "light",
                                  preset: "reset"
                                }
                              },
                              params: {
                                token: '${paymentData.paymentDetailsData.extToken}'
                              },
                              css_variable: {
                                main: '${paymentData.color}',
                                card_bg: '#353535',
                                card_shadow: '#9ADBE8'
                              }
                            };
                        
                            // Assuming `checkout()` is exposed globally by the Flitt script
                            checkout("#checkout-container", Options);
                          </script>
                        
                        </body>
                        </html>"""
addJavascriptInterface(JavaScriptHandler(this@FlittWebViewActivity), ANDROID)
                webChromeClient = GooglePayWebChromeClient(this@FlittWebViewActivity)

                webViewClient = baseWebViewClient
                isPreloadLoaded = false

                val cookieManager = CookieManager.getInstance();
                cookieManager.setAcceptCookie(true);
                cookieManager.setAcceptThirdPartyCookies(this, true);
                loadDataWithBaseURL("https://google.com", form, "text/html; charset=utf-8", "UTF-8", null)
                isloading = false

To resolve this issue, please follow the steps:

  1. Check Google instructions on OR_BIBED_15 troubleshooting
    OR_BIBED_15 errors
    Using Android WebView
    OR_BIBED_15 Google Pay couldn’t load properly because this App uses a WebView.

  2. Ensure that you are setting these flags during webview initialization:

    webView.settings.apply {
    setSupportMultipleWindows(true)
    javaScriptCanOpenWindowsAutomatically = true
    }

1 Like