我正在尝试使用 Stripe CLI 触发测试事件但收到错误:
stripe trigger checkout.session.completed \
--add checkout_session:customer_email='[email protected]'
Setting up fixture for: product
Running fixture for: product
Setting up fixture for: price
Running fixture for: price
Setting up fixture for: checkout_session
Running fixture for: checkout_session
Setting up fixture for: payment_page
Running fixture for: payment_page
Setting up fixture for: payment_method
Running fixture for: payment_method
Setting up fixture for: payment_page_confirm
Running fixture for: payment_page_confirm
Trigger failed: Request failed, status=400, body={
"error": {
"message": "An error has occurred confirming the Checkout Session.",
"request_log_url": "https://dashboard.stripe.com/test/logs/req_elQJtM7U0QAPjO?t=1735241822",
"type": "invalid_request_error"
}
}
我处于测试模式并使用最新的 Stripe CLI 版本。什么可能导致此错误,我该如何修复它?任何帮助都将不胜感激。谢谢!
我尝试使用 Stripe CLI 通过以下命令触发测试 checkout.session.completed webhook 事件:
stripe trigger checkout.session.completed \
--add checkout_session:[email protected]
预期行为:
Webhook 应使用提供的电子邮件参数成功触发,应收到带有测试事件数据的成功响应
实际行为:
收到错误响应:
{
"error": {
"message": "An error has occurred confirming the Checkout Session.",
"request_log_url": "https://dashboard.stripe.com/test/logs/req_M8CaC5kpkEz0JH?t=1735241549",
"type": "invalid_request_error"
}
}
我正在测试模式下运行它,并已验证我的 Stripe CLI 是最新的。出于开发目的,我需要使用特定的电子邮件参数测试此 webhook。