googletez / inapp-payment-samples

28 stars 20 forks source link

On integrating Google pay and trying to pay I'm getting payment failed #6

Open Chhokra opened 4 years ago

Chhokra commented 4 years ago

The whole error says ''Payment failed : You've exceeded the maximum transaction amount set by your bank' . What to do? The code is almost similar to the official documentation

varunagharav commented 4 years ago

same happens with me, please help

azhar1038 commented 4 years ago

This issue started to appear a few days ago. I think they made some changes in their backend recently which is rejecting the payments made with intent call. Please share how to solve this problem.

MuthuKrishnanO commented 4 years ago

The same happens to me,

MuthuKrishnanO commented 4 years ago

private void startPayment() {

   // Log.e("main ", "name "+Bankapi +"--up--"+upiId+"--"+ note+"--"+amount);
    // main: name pavan n--up--pavan.n.sap@okaxis--Test UPI Payment--5.00

    Uri uri = Uri.parse("upi://pay").buildUpon()
            .appendQueryParameter("pa", Bankapi)
            .appendQueryParameter("pn", Branchname)
            //.appendQueryParameter("mc", "")
            //.appendQueryParameter("tid", "02125412")
            //.appendQueryParameter("tr", "25584584")
            .appendQueryParameter("tn",mSchemeName)
            .appendQueryParameter("am", orderamount.getText().toString())
            .appendQueryParameter("cu", "INR")
            //.appendQueryParameter("refUrl", "blueapp")
            .build();

    Intent upiPayIntent = new Intent(Intent.ACTION_VIEW);
    upiPayIntent.setData(uri);
    upiPayIntent.setPackage(GOOGLE_TEZ_PACKAGE_NAME);
    // will always show a dialog to user to choose an app
    Intent chooser = Intent.createChooser(upiPayIntent, "Pay with");

    // check if intent resolves
    if(null != chooser.resolveActivity(getPackageManager())) {
        startActivityForResult(chooser, UPI_PAYMENT);
    } else {
        Toast.makeText(GooglePayActivity.this,"No UPI app found, please install one to continue",Toast.LENGTH_SHORT).show();
    }
}
Chhokra commented 4 years ago

private void startPayment() {

   // Log.e("main ", "name "+Bankapi +"--up--"+upiId+"--"+ note+"--"+amount);
    // main: name pavan n--up--pavan.n.sap@okaxis--Test UPI Payment--5.00

    Uri uri = Uri.parse("upi://pay").buildUpon()
            .appendQueryParameter("pa", Bankapi)
            .appendQueryParameter("pn", Branchname)
            //.appendQueryParameter("mc", "")
            //.appendQueryParameter("tid", "02125412")
            //.appendQueryParameter("tr", "25584584")
            .appendQueryParameter("tn",mSchemeName)
            .appendQueryParameter("am", orderamount.getText().toString())
            .appendQueryParameter("cu", "INR")
            //.appendQueryParameter("refUrl", "blueapp")
            .build();

    Intent upiPayIntent = new Intent(Intent.ACTION_VIEW);
    upiPayIntent.setData(uri);
    upiPayIntent.setPackage(GOOGLE_TEZ_PACKAGE_NAME);
    // will always show a dialog to user to choose an app
    Intent chooser = Intent.createChooser(upiPayIntent, "Pay with");

    // check if intent resolves
    if(null != chooser.resolveActivity(getPackageManager())) {
        startActivityForResult(chooser, UPI_PAYMENT);
    } else {
        Toast.makeText(GooglePayActivity.this,"No UPI app found, please install one to continue",Toast.LENGTH_SHORT).show();
    }
}

What's this @OLIMUTH

Chhokra commented 4 years ago

@shengdac can you please comment?