Stripe not referenced in Vue app

Getting the following error when initializing the card element…

"'Stripe' is not defined"

I have even imported the script tag for the stripe CDN in the index.html of my vue app so that its definitely rendered first but still to no avail.

No matter where I put the line

"let stripe = Stripe(process.env.STRIPE_PUBLIC_KEY)," 

whether it be in the mounted function or as you have it in the script section, it still isn’t referencing anything.

Please help!

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer