razorpay / razorpay-android-sample-app

Sample app demonstrating integration of Razorpay checkout
MIT License
89 stars 90 forks source link

Razorpay callback returns succesfull even transaction is not successfull #233

Closed Priyanshi-Z closed 3 years ago

Priyanshi-Z commented 3 years ago

Description Making the payment with Upi via Razorpay gateway in test environment.

Paytm - After upi id invalid Paytm returns the callback to the calling app. And in Razorpay onSuccess callback is returned

Razorpay SDK Version : com.razorpay:checkout:1.6.6

Android OS Version : Tested on Android 8.1, android 10 issue exist most probably issue is on every device

What you did: Trying to make payment from Paytm via Razorpay gateway. in Test mode

What happened: After successfully Paytm detects Razorpay testing UPI id as invalid and returns control back to calling app. In onSuccess callback flow is returned.

Steps To Reproduce Provide a detailed list of steps that reproduce the issue.

Choose Razorpay -> UPI -> Paytm -> {pay in paytm} -> invalid upi id - automatically coming back to app from Paytm -> Razorpay tells transaction is successful

vivekshindhe commented 3 years ago

@Priyanshi-Z could you please try this with Live Mode key? Also, the invalid_upi_id part, is the upi_id to which you are paying is invalid or is the upi_id with which you are paying is invalid?

Priyanshi-Z commented 3 years ago

@vivekshindhe Yes it's not happening in live mode. I would give a feedback to either add this behavior in the document or return the call to on error callback so that it doesn't create any confusion for other folks. Thanks

@vivekshindhe Could you help me on this too. I want to avoid the retry option. In my case it is happening (In Live mode ) I have selected cards --> Added testing cards --> payment fails -->razor pay shows screen of payment fail (for around 2 seconds) --> then again card details has to be added (I don't want it).

Just adding retry option is disabled while passing the payloads to razorpay. Could you help me on this too.

vivekshindhe commented 3 years ago

@Priyanshi-Z Please refer the Retry object in this doc,

https://razorpay.com/docs/payment-gateway/web-integration/standard/checkout-options/

You'll have to pass a JSONObject retry with the payload.

Closing this ticket for now. Please feel free to open another if needed.

Thank you.