Coder Social home page Coder Social logo

saadaakash / bkashquickstarterandroid Goto Github PK

View Code? Open in Web Editor NEW
19.0 2.0 1.0 1.37 MB

Quick Starter Android Boilerplate for Easy bKash Integration

Home Page: https://saadaakash.github.io/bKashQuickStarterAndroid/

Kotlin 100.00%
kotlin android bkash bkash-payment-gateway bkash-online-payment bkash-pgw bkash-android made-in-bangladesh bangladesh

bkashquickstarterandroid's Introduction

Hey there, it's Saad from 🇧🇩

I write stupid codes to build simple products that solve complex problems. You can find me on:


🛠️  Tech Stack

  • 🗡️  Languages: 

  • 🛡️  Data: 

  • ⚔️  Libraries/Frameworks: 

  • ⚓  Build Tools/Platforms:  

  • 🏹  Miscellaneous: 


💬 Drop a mail: [email protected]

bkashquickstarterandroid's People

Contributors

saadaakash avatar

Stargazers

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

Watchers

 avatar  avatar

Forkers

mortuzahossain

bkashquickstarterandroid's Issues

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

You need to update WebViewClient interface to handle SSLError.
Otherwise, you will get Alert from google play store after publishing the 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
            }
        }

OnPayment cancel it remains in the same screen.

I am using your source code and in my first run, it is not showing any message when I click payment to cancel and keeps on the same screen rather than back on the main screen.

And I need a little more information, where to change the merchant id to configure with mine.

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.