payu-intrepos / PayUCheckoutPro-Android

PayUCheckoutPro SDK for Android
9 stars 9 forks source link

SDK is showing UI after cancel transaction. #7

Closed dheerajrijhwani closed 3 years ago

dheerajrijhwani commented 3 years ago

I am facing a strange issue.

Most of times "generateHash()" method is not getting called when I am clicking some button in the SDK UI. It shows progress bar in UPI and in Card Details and Wallets it's doing nothing. But as soon as I cancel the transaction the "generateHash()" gets called and the SDK shows the UI again.

What could be the possible issues ?

Rahul-Hooda commented 3 years ago

@dheerajrijhwani - generateHash() method is called whenever SDK will require a dynamic hash. For UPI Collect, for verifying VPA, dynamic hash is required hence, generateHash() method is called. But its not necessary that it will be called on every button click in SDK's UI. For more details on this please refer here - https://payumobile.gitbook.io/sdk-integration/android/payucheckoutpro/hash-details

dheerajrijhwani commented 3 years ago

I understand that but the generateHash() method is not getting called when it should. But it is calling after I cancel the transaction.

Rahul-Hooda commented 3 years ago

@dheerajrijhwani - Can you share exact replicating steps along with CheckoutPro SDK version?

dheerajrijhwani commented 3 years ago

@Rahul-Hooda The issue has been resolved. When I was generating the hash. I was using ViewModel. The ViewModel not passing data when my activity was not showing. As I cancel the transaction my activity would show and ViewModel would pass the data. Thanks for your help.