error 'Stripe' is not defined no-undef
It's only a problem of getting it compiled. The proper way to fix it is to ask compiler to not look for Stripe
and it will be available globally. Add this comment /* global Stripe */
before you initialize Stripe
:
/* global Stripe */
const stripe = Stripe('STRIPE_KEY');
I figured it out! I was being a bit of a dumby.
I changed Stripe
to window.Stripe
in my code, and it works now!
Thanks everyone.