我使用带节点js的条来支付费用,我正在创建一个会话并使用条签出接口。我使用一个web钩子来听事件,当付款被创建或成功的时候,stripe发送payment_intent.succeeded,所以我用它做了一些事情。但问题是,当我单击cancel url取消付款时,stripe不取消付款,也不发送payment_intent.canceled,这是一个问题,因为我不知道是否取消了付款,我无法做我计划做的事情。这是我的代码:
// This will share the stripe publickey with the frontend
const webhook = async (req, r