What will be the reponse when a payment got declined from user bank while making payment from android app?

Posted in General by Tiffin Geek Fri Nov 10 2017 05:56:14 GMT+0000 (UTC)·Viewed 379 times

Hi, I am facing a very wired issue. I have implemented the your payment gateway in my Apps(IOS/Android). In android app, i integrated the payment gateway as per the instruction provided in below link: https://docs.instamojo.com/v1.1/page/android-integration-devsupport-ai In this approach, i am using the following method to place an order from my app: private void initListener() { listener = new InstapayListener() { @Override public void onSuccess(String response) { Toast.makeText(getApplicationContext(), response, Toast.LENGTH_LONG) .show(); ##Place Order## } @Override public void onFailure(int code, String reason) { Toast.makeText(getApplicationContext(), "Failed: " + reason, Toast.LENGTH_LONG) .show(); } }; } when onSuccess method is called, only then i am making a call to my method to make order. but when a payment got declined from bank it is still landing in the onSuccess method and order gets placed even in the case of no payment made. Please check and let me know how to resolve this issue.
Markdown is allowed