next.js Post“http://localhost:4242/webhook”:dial tcp 127.0.0.1:4242:connect:connection refuse

svmlkihl  于 9个月前  发布在  其他
关注(0)|答案(1)|浏览(92)

我在next.js 13中使用了stripe,配置了ts和app router。
我使用stripe listen --forward-to localhost:4242/webhook在我的本地机器上创建条带事件,但我得到这个错误stripe listen --forward-to localhost:4242/webhook的每个事件。

dnph8jn4

dnph8jn41#

而不是使用localhost:4242/webhook,你应该使用你的next.js端口和API路由,如:
localhost:3000/app/api/checkout/stripe/webhook

相关问题