无缝集成cc途径,我收到了嵌入式Web视图(响应)如何访问失败和成功事务详细信息

时间:2019-01-31 05:18:54

标签: android ccavenue

        webView.getSettings().setJavaScriptEnabled(true);
        webView.loadDataWithBaseURL("", html, "text/html", "UTF-8", "");
        webView.getSettings().setJavaScriptEnabled(true);
        webView.getSettings().setDomStorageEnabled(true);
        webView.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);

        webView.addJavascriptInterface(new PaymentSucess(this), "Payment");

        webView.setWebViewClient(new WebViewClient() {
            @Override
            public void onPageFinished(WebView view, String url) {
                super.onPageFinished(view, url);

                //  webView.loadUrl(myResult);


            }

            @Override
            public void onReceivedError(WebView view, WebResourceRequest request, WebResourceError error) {
                super.onReceivedError(view, request, error);
            }
        });




    }


     class PaymentSucess {
        Activity activity;

        public PaymentSucess(CC_Avenue_Paymentview cc_avenue_paymentview) {
            activity = cc_avenue_paymentview;
        }

        @JavascriptInterface
        public void submit() {
            Log.d("Url", webView.getUrl());
        }

        @JavascriptInterface
        public void cancel() {
            Log.d("Url", webView.getUrl());
        }


    }
    public   void  goSucessPage(Url url){

    }

0 个答案:

没有答案