如何在 razorpay 支付测试模式下点击 "Failure" 进行 API 调用?

How to make an API call on clicking "Failure" in razorpay payment test mode?

In image 1, once I click the "Pay" button, I'll be redirected to the razorpay API.

In image 2, Once I'm in razorpay's API URL in test mode, I have two options, Success and Failure. On clicking success, I'm able to call the payments.capture function. But on clicking "Failure", I'm not able to get any response and no function is being called

我正在使用 MEAN 堆栈,razorpay 与 Node JS 集成。任何建议都会很有帮助。

提前致谢。

在 Razorpay 仪表板中。转到设置> Webhooks > 给你的 webhook url(Select 你想要的事件)。

一旦用户在测试模式下点击失败。 Razorpay 将向相应的 webhook url given.Note 发送一个 webhook 响应 "Payment Failed",它将采用 json 的形式。