bennypowers / stripe-elements

Custom Element Wrapper for Stripe.js v3 Elements
https://stripe-elements.netlify.app/
79 stars 20 forks source link

Error: You must provide a Stripe Element or a valid token type to create a Token. #97

Open timsayshey opened 2 years ago

timsayshey commented 2 years ago

My Vue app is a web component with a shadow dom and I'm using the stripe-elements component but after entering the credit card into the form, I grab the stripe-elements element and I try to run stripe.createToken() and I get the following error:

Here's my app: https://app.ecardwidget.com/widget/5150

image

bennypowers commented 2 years ago

Kinda hard to debug this based on just a screenshot, I'm going to need more information. Did you provide a publishable key? How? Can you verify that the element has that key before calling create token?

timsayshey commented 2 years ago

Yes, I provided it, just like in the Vue example you provided. Yes, I verified it.

Does this help?

image

bennypowers commented 2 years ago

Could you provide a minimal reproduction on codepen or stackblitz or glitch or whatever? Don't add your pk I'll bring my own