Getting error “You have exceeded the maximum transaction amount set by your bank” when calling Google Pay intent from my android app

烈酒焚心 提交于 2021-02-15 05:38:44

问题


I am facing a problem with Google pay integration(in-app payment) in android app. When I make a request to transact I am getting the error "You have exceeded the maximum transaction amount set by your bank" even though that is my first transaction. And when I try to send amount directly from Google pay it works.

This is the Google pay's in-app payment resource.

Here is code


Uri uri = new Uri.Builder()
                .scheme("upi")
                .authority("pay")
                .appendQueryParameter("pa", upiId) //receiver's upiId
                .appendQueryParameter("pn", name)  //receiver's name
                .appendQueryParameter("tn", transactionNote) // reason for transaction
                .appendQueryParameter("am", amount) // amount
                .appendQueryParameter("cu", "INR")
                .build();
// Intent to call GPay app
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(uri);
intent.setPackage(GOOGLE_PAY_PACKAGE_NAME);
startActivityForResult(intent, GOOGLE_PAY_REQUEST_CODE);

I have gone through quite a number of resources online but didn't find any solution. Any help or suggestions would be greatly helpful ?


回答1:


Facing the same problem. Was working fine a couple of weeks earlier. Suddenly stopped working




回答2:


Yes, From 20th Oct 2020, Google pay app is showing the error "bank limit exceeded" when using intent call. The solution is simple,

    • Now google pay normal app ID can't be use for accepting payment via intent call. You need a google pay business app ID.
    • Use param "mc" and "tr" in intent call. Where "mc" stand for -"merchant code" and "tr" stand for - "transaction refer id" You can pass "mc" as blank value and "tr" can be any random value.

You can see complete details about it from here . As of now it is working perfectly for Google pay app.

Uri uri = Uri.parse("upi://pay").buildUpon()
     .appendQueryParameter("pa", upiId)  // google pay business id
     .appendQueryParameter("pn", name)
     .appendQueryParameter("mc", "")            /// 1st param - use it (it was commented on my earlier tutorial)
     //.appendQueryParameter("tid", "02125412")
     .appendQueryParameter("tr", "25584584")   /// 2nd param - use it (it was commented on my earlier tutorial)
     .appendQueryParameter("tn", note)
     .appendQueryParameter("am", amount)
     .appendQueryParameter("cu", "INR")
     //.appendQueryParameter("refUrl", "blueapp")
     .build();


来源:https://stackoverflow.com/questions/64481458/getting-error-you-have-exceeded-the-maximum-transaction-amount-set-by-your-bank

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!