Open YudizMohitS opened 3 years ago
@YudizMohitS - When calling startPayUMoneyFlow(), don't use activity context and just pass this.
@Rahul-Hooda Thanks. for your reply but this is not work with Fragment
I am using this lib implementation 'com.payumoney.sdkui:plug-n-play:1.6.1'
@YudizMohitS - You must be calling below integration function from your code -
// Invoke the following function to open the checkout page. PayUmoneyFlowManager.startPayUMoneyFlow( PayUmoneySdkInitializer.PaymentParam paymentParam, Activity context, int style, boolean isOverrideResultScreen)
Now, when calling this from Activity, you can pass this which will pass activity context. In your case, you are calling it from inside a fragment. Please make sure to pass your fragment context and you shouldn't pass getActivity() in this.
@Rahul-Hooda How can I pass this inside of Fragment because there is an Activity context in startPayUMoneyFlow method. Below is my SS
@YudizMohitS - Yes. Activity context is consumed by the method. In this case, onActivityResult() of your activity will be called. From there you can consume the result.
@Rahul-Hooda But my question is there is any way to handle inside of Fragment?
@YudizMohitS - No, You can not handle it inside Fragment. The only way to handle it is through the Activity's onActivityResult()
Is there any way to get a callback from Fragment?