GithubHelp home page GithubHelp logo

bkash-pgwclient-demo-android's People

Contributors

fahadbk avatar tahniat-ashraf-bkash avatar washfi-ahmad avatar wordhulhasan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

bkash-pgwclient-demo-android's Issues

Your app is using an unsafe implementation of WebViewClient.onReceivedSslError handler

You need to update your README.md file and WebViewClient interface to handle SSLError.
Otherwise, you will get Alert from google play store after publishing app. You can try this bunch of code to handle

bkashWebView.webViewClient = object : WebViewClient() {

            override fun onReceivedSslError(view: WebView?, handler: SslErrorHandler, error: SslError?) {
                val builder = AlertDialog.Builder(context!!)

                val message = when (error?.primaryError) {
                    SSL_UNTRUSTED -> "The certificate authority is not trusted."
                    SSL_EXPIRED -> "The certificate has expired."
                    SSL_IDMISMATCH -> "The certificate Hostname mismatch."
                    SSL_NOTYETVALID -> "The certificate is not yet valid."
                    SSL_DATE_INVALID -> "The date of the certificate is invalid"
                    else -> "A generic error occurred"
                }

                builder.setTitle("SSL Certificate Error")
                builder.setMessage(message)

                builder.setPositiveButton("Continue") { _,_ -> handler.proceed() }
                builder.setNegativeButton("Cancel") { _,_ -> handler.cancel() }

                val dialog = builder.create()
                dialog.show()
            }

            override fun shouldOverrideUrlLoading(view: WebView?, url: String?): Boolean {
                loadingProgressBar.visibility = View.VISIBLE
                if (url == "https://www.bkash.com/terms-and-conditions") {
                    startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(url)))
                    return true
                }
                return false
            }

            override fun onPageStarted(view: WebView?, url: String?, favicon: Bitmap?) {
                loadingProgressBar.visibility = View.VISIBLE
            }

            override fun onPageFinished(view: WebView?, url: String?) {
                bkashWebView.let {
                    it.loadUrl("javascript:callReconfigure($paymentRequest )")
                    it.loadUrl("javascript:clickPayButton()")
                }
                loadingProgressBar.visibility = View.GONE
            }
        }

Error when building demo app: Connect timed out

I've downloaded the demo as a zip file but I can't seem to get the app to work as it fails to synchronize with gradle files with the error:
ERROR: Cause: connect timed out
Can anyone please help me with this issue?

Need to remove onReceivedSslError from CheckoutWebViewClient class

Play store reject the app update due to override the method
public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) {
handler.proceed();
}

the error cause like as below:
onReceiverdSSlError
Your app is using an unsafe implementation of WebViewClient.onReceivedSSLError handler.

Android payment SDK

Why do we need to design the webpage for the payment gateway?
Doesn't the payment gateway has its own secure website?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.