Unable to get failure response while integrating with the library
See original GitHub issueHi, I am using the latest version of this library (2.2.9) and it’s working fine for success response. But I’m not getting any response for failure case like wrong upi (eg: failure@razorpay).
If the payment is success, I’m getting success logger which is data in below. If the payment is failure, I’m not getting any logger, just giving payment failure from the gateway in UI. But nothing in logger which I’m calling.
Below is my razor pay integration,
const handleRazorPay = (response) =>{ try { var options = { description: ‘Credits towards consultation’, image: ‘https://i.imgur.com/3g7nmJC.png’, currency: response.currency, key: response.merchant_key, amount: response.amount, name: response.name, order_id: response.order_id, prefill: { email: response.email, contact: response.number, name: ‘Razorpay Software’, }, theme: {color: ‘#F37254’}, }; console.log('options:: ', options); RazorpayCheckout.open(options) .then(data => { console.log('data:: ', data); alert(‘success’); }) .catch(error => { // handle failure console.log(
Error Payment cancelled ${error.code} | ${error.description}
, ); console.log('Error data:: ', error); }); } catch (error) { console.log('Error in rendering payment gateway:: ', error.message); } }
Issue Analytics
- State:
- Created a year ago
- Comments:7 (3 by maintainers)
@gani419 ack. Checking it. Will notify ASAP
Thank you for your response…