无法在Webview应用中打开付款网关页面

时间:2020-06-15 07:11:13

标签: wordpress woocommerce android-webview payment-gateway payumoney

我正在尝试为我的网站“ www.hotelballerina.com”构建一个网络视图应用。 Webview URL是“ www.hotelballerina.com/online-orders”(使用woocomerce的购物页面)。我面临的问题是,直到我在payumoney Popup输入我的银行卡详细信息之前,所有功能都按预期工作。

一旦输入了卡的详细信息,然后我们按OK即可将我们重定向到银行付款页面,它将显示空白屏幕且无错误。该交易甚至可以正确反映在PayuMoney仪表板上。

我猜这里的问题是webview应用程序可能限制了银行页面的弹出窗口,但这就是我所猜的。 MainActivity.java

    package com.sumeet.samajbandhuapp;

import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import android.webkit.WebView;
import android.webkit.WebViewClient;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        WebView webView = (WebView) findViewById(R.id.webview);
        webView.getSettings().setJavaScriptEnabled(true);
        webView.loadUrl("https://hotelballerina.com/online-orders/");
        webView.setWebViewClient(new WebViewClient());

    }
}

activity_min.xml

`<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".MainActivity">

    <WebView
        android:id="@+id/webview"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        tools:layout_editor_absoluteX="1dp"
        tools:layout_editor_absoluteY="1dp" />
</androidx.constraintlayout.widget.ConstraintLayout>`

AndroidManifest.xml

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.sumeet.samajbandhuapp">
    <uses-permission android:name="android.permission.INTERNET"/>

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">
        <activity android:name=".MainActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

</manifest>

当我尝试在手机浏览器或笔记本电脑上使用该网站时,一切正常。当我在网络视图中使用该应用程序时,就创建了该问题。请给我一个有关此问题的提示,以便可以解决

0 个答案:

没有答案