-
Notifications
You must be signed in to change notification settings - Fork 36
Description
Payment flow is working fine when paytm app is already installed in the device but in case paytm app is not installed, sdk is launching a webview and after payment completion the callback url is getting loaded in the same webview and i am not receiving payment response in the callback method of PaytmPaymentTransactionCallback() interface. And the webview stays there only unless i press back button.
`PaytmOrder paytmOrder = new PaytmOrder(order_id, BuildConfig.PAYTM_KEY, token, amount, BuildConfig.PAYTM_CALLBACK_URL.replace("[[order_id]]",order_id));
TransactionManager manager = new TransactionManager(paytmOrder, new PaytmPaymentTransactionCallback() {
@OverRide
public void onTransactionResponse(Bundle bundle) {
Log.d("ecedcc: ", "onTransactionResponse called");
if (bundle != null) {
for (String key : bundle.keySet()) {
Log.e("ecedcc: ", key + " : " + (bundle.get(key) != null ? bundle.get(key) : "NULL"));
}
} else {
Log.d("ecedcc: ", "paytm result bundle null");
showPaymentFailed(Constants.DEFAULT_WALLET);
}
}
@Override
public void networkNotAvailable() {
Log.d("ecedcc: ", "networkNotAvailable called");
showPaymentFailed(Constants.DEFAULT_WALLET);
}
@Override
public void onErrorProceed(String s) {
Log.d("ecedcc: ", "onErrorProceed called");
showPaymentFailed(Constants.DEFAULT_WALLET);
}
@Override
public void clientAuthenticationFailed(String s) {
Log.d("ecedcc: ", "clientAuthenticationFailed called");
showPaymentFailed(Constants.DEFAULT_WALLET);
}
@Override
public void someUIErrorOccurred(String s) {
Log.d("ecedcc: ", "someUIErrorOccurred called");
showPaymentFailed(Constants.DEFAULT_WALLET);
}
@Override
public void onErrorLoadingWebPage(int i, String s, String s1) {
Log.d("ecedcc: ", "onErrorLoadingWebPage called");
showPaymentFailed(Constants.DEFAULT_WALLET);
}
@Override
public void onBackPressedCancelTransaction() {
Log.d("ecedcc: ", "onBackPressedCancelTransaction called");
showPaymentFailed(Constants.DEFAULT_WALLET);
}
@Override
public void onTransactionCancel(String s, Bundle bundle) {
Log.d("ecedcc: ", "onTransactionCancel called");
showPaymentFailed(Constants.DEFAULT_WALLET);
}
});
manager.setShowPaymentUrl("https://securegw.paytm.in/theia/api/v1/showPaymentPage");
manager.startTransaction(GatewayActivity.this, PAYTM_REQUEST_CODE);
`
callback url = https://securegw.paytm.in/theia/paytmCallback?ORDER_ID=[[order_id]]