Stripe payments 条带处理支付错误500(内部服务器错误)

Stripe payments 条带处理支付错误500(内部服务器错误),stripe-payments,Stripe Payments,正如标题所说,我在执行订单时遇到了问题,我只是得到了这个错误: GET https://website.com/public/intent 500 (Internal Server Error) "This API call cannot be made with a publishable API key. Please use a secret API key. You can find a list of your API keys at https://dashboard.s

正如标题所说,我在执行订单时遇到了问题,我只是得到了这个错误:

GET https://website.com/public/intent 500 (Internal Server Error)
"This API call cannot be made with a publishable API key. Please use a secret API key. You can find a list of your API keys at https://dashboard.stripe.com/account/apikeys."
我就是这样实现stripe的:

<script src="https://js.stripe.com/v3/"></script>
<script>
 // Stripe stuff
 var stripe = Stripe('pk_test_key');
 var elements = stripe.elements();</script>
当我尝试使用密钥时,它告诉我使用公钥,反之亦然


有人能帮我吗?

你想进行什么API调用?与Stripe集成(例如以下)需要客户端和服务器端组件。在JavaScript世界中,您可以使用服务器上的
stripe node
()和客户端应用程序中的可发布密钥stripe.js(例如:React app)和


切勿在客户端应用程序中包含密钥。这不安全。

请分享更多详细信息。当出现错误500时,通常会有东西写入服务器或应用程序的logI get此错误:“无法使用可发布的API密钥进行此API调用。请使用机密API密钥。您可以在中找到API密钥列表。”