重定向到 Checkout 的域 (C:/../index.html) 未在仪表板中启用 [Stripe API]

The domain (C:/../index.html) that redirected to Checkout is not enabled in the dashboard [Stripe API]

在 index.html 中使用 stripe 付款的结帐按钮时,stripe 抛出以下错误:

The domain (C:/../index.html) that redirected to Checkout is not enabled in the dashboard

我阅读了文档,他们告诉我们应该在这个 URL 中添加结帐域:https://dashboard.stripe.com/settings/checkout,所以我添加了 index.html,但它仍然是一样的

我不明白发生了什么,请帮忙

您提供了本地文件 (C:/../index.html) 作为结帐会话的成功 URL,而不是可在 Internet 上访问的 URL。 Checkout 需要一个真正的 URL 才能工作。

该错误专门通知您,在使用仅限客户端的结账时,您必须首先提供您打算在仪表板设置中使用的域列表:https://dashboard.stripe.com/settings/checkout

请记住,您必须提供真实的 URL 而不是系统文件的路径。