paytm / Paytm_Payments_Android_Sample_Apps

12 stars 36 forks source link

onActivityResult() is not getting called, even if the PayTm app is installed in device. #6

Open Priyavrat-12 opened 3 years ago

Priyavrat-12 commented 3 years ago

Integrated the new PayTm SDK

But when the transaction is successful or failed, TransactionManager.onTransactionResponse(Bundle bundle) is getting called, But as per the documentation, it should call the onActivityResult() when the PayTM app is installed in the device.

Below is the code to initiate the transaction.

    PaytmOrder paytmOrder = new PaytmOrder(orderIdString, midString, txnTokenString, txnAmountString, callbackURL);

    TransactionManager transactionManager = new TransactionManager(paytmOrder, new PaytmPaymentTransactionCallback(){

        @Override
        public void onTransactionResponse(Bundle bundle) {
        }

        @Override
        public void networkNotAvailable() {
        }

        @Override
        public void onErrorProceed(String s) {
        }

        @Override
        public void clientAuthenticationFailed(String s) {
        }

        @Override
        public void someUIErrorOccurred(String s) {
        }

        @Override
        public void onErrorLoadingWebPage(int i, String s, String s1) {
        }

        @Override
        public void onBackPressedCancelTransaction() {
        }

        @Override
        public void onTransactionCancel(String s, Bundle bundle) {
        }
    });
    transactionManager.startTransaction(this, PAYTM_RESPONSE_CODE);
soumyavats commented 3 years ago

onTransactionResponse is called in case paytm app is not installed

Priyavrat-12 commented 3 years ago

@soumyavats This is true, But in my case, onTransactionResponse() is getting called even if the PayTm app is installed in device.

For payment/ transaction, it is not opening the PayTm app, While it opens up the web view for transaction.

soumyavats commented 3 years ago

Please mail us at integration.dev@paytm.com with a video depicting the same

HunterPillu commented 2 years ago

Same issue is happening on my implementation as well