我正在尝试使用react-stripe-elements在我的React JS应用程序中创建一个Stripe付款表单。当我使用该组件时,我收到以下消息。
Error: A cross-origin error was thrown. React doesn't have access to the actual error object in development.
如果我使用单独的元素组件(即 CardExpiryElement
、CardCVCElement
、PostalCodeElement
),则不会出现错误。
有人有什么想法吗?谢谢。
最佳答案
如果您正在使用 CardElement,则不要使用其他元素,例如 CardExpiryElement 或 CardCVCElement 等,因为 CardElemets 为您提供了一切
关于reactjs - React-stripe-elements CardElement 抛出跨源错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50629518/