Tuesday, 2 March 2021

Google Pay UPI Integration not working in android

GPay integration was working totally fine before 2 days but now its showing same error in gpay app. Intent calling for gpay payment is not working. I have completed transaction successfully days before. but now its not working. Any help would be appreciated! Thanks in Advance.

My Code

 uriapp = new Uri.Builder()
            .scheme("upi")
            .authority("pay")
            .appendQueryParameter("pa", getString(R.string.vpa))
            .appendQueryParameter("pn", getString(R.string.payee))
            .appendQueryParameter("tr", orderId)
            .appendQueryParameter("tn", description)
            .appendQueryParameter("am", String.valueOf(amount))
            .appendQueryParameter("cu", "INR")
            .build();

 Intent intent = new Intent(Intent.ACTION_VIEW);
        intent.setData(uriapp);
        intent.setPackage(model.getPackageName());
        if (intent.resolveActivity(getPackageManager()) != null) {
            startActivityForResult(intent, GOOGLE_REQUEST_CODE);
        } else {
            Toast.makeText(this, "This payment mode is not available on your device.", Toast.LENGTH_LONG).show();
        }

I am using correct vpa business Id.

GPay Error:

this transaction may be risky. for your safety it cant be completed at this time


from Google Pay UPI Integration not working in android

No comments:

Post a Comment