androidcheckoutpayumoney

PayUMoney- Android Remove postCheckout pages


I have successfully integrated PayUMoney in my Android project but after Success/Failure of any payment we received the post Checkout pages from PayUMoney like below

Failure screen Success screen

Now on click of provided button I received my payment info in onActivityResult method.

Is there any way to skip these pages and directly get the results in onActivityResult?

Code Implemented (PayUMoney Config Object):

PayUmoneyConfig payUmoneyConfig = PayUmoneyConfig.getInstance();
        payUmoneyConfig.setPayUmoneyActivityTitle("Payments");
        payUmoneyConfig.disableExitConfirmation(true);

        payUmoneyConfig.setDoneButtonText("Continue");
        txnId = "txn_"+System.currentTimeMillis();
        PayUmoneySdkInitializer.PaymentParam.Builder builder = new 

    PayUmoneySdkInitializer.PaymentParam.Builder();
            builder.setAmount(balance)
                    .setTxnId(txnId)
                    .setPhone(new SharedPreferencesUtils(ActivityPayUMoney.this).getUserPhone())
                    .setProductName("Product Name")
                    .setFirstName(new SharedPreferencesUtils(ActivityPayUMoney.this).getUserName())
                    .setEmail(new SharedPreferencesUtils(ActivityPayUMoney.this).getUserEmail())
                    .setsUrl("https://www.payumoney.com/mobileapp/payumoney/success.php")
                    .setfUrl("https://www.payumoney.com/mobileapp/payumoney/failure.php")
                    .setUdf1("")
                    .setUdf2("")
                    .setUdf3("")
                    .setUdf4("")
                    .setUdf5("")
                    .setUdf6("")
                    .setUdf7("")
                    .setUdf8("")
                    .setUdf9("")
                    .setUdf10("")
                    .setIsDebug(new SharedPreferencesUtils(ActivityPayUMoney.this).getPayUMoneyDebug())
                    .setKey(new SharedPreferencesUtils(ActivityPayUMoney.this).getPayMerchantKey())
                    .setMerchantId(new SharedPreferencesUtils(ActivityPayUMoney.this).getPayMerchantSalt());

Gradle implemented

implementation 'com.payumoney.sdkui:plug-n-play:1.6.0'

Solution

  • Finally solved it I was just doing a small mistake

    just replace

        PayUmoneyFlowManager.startPayUMoneyFlow(mPaymentParams, 
    ActivityPayUMoney.this, R.style.PayUMoney, false);
    

    with

        PayUmoneyFlowManager.startPayUMoneyFlow(mPaymentParams, 
    ActivityPayUMoney.this, R.style.PayUMoney, true);