complete-node-bootcamp icon indicating copy to clipboard operation
complete-node-bootcamp copied to clipboard

Stripe is not defined!

Open rohit-13 opened this issue 2 years ago • 4 comments

  • bundle.js:6895 Uncaught ReferenceError: stripe is not defined

Payment session is working in the backend, but int the stripe.js file; but gives the error while callling Stripe function to create the session.

  • stripe.js file
    • import { showAlert } from './alert';
    • stripe = Stripe(''-----------);

rohit-13 avatar Nov 26 '22 19:11 rohit-13

Hi! If it is still actual, put stripe = Stripe(''-----------) in try block

astas2286 avatar Mar 28 '23 16:03 astas2286

Hi! You should need to move the "script(src='https://js.stripe.com/v3/')" script from tour.pug to base.pug, hopefully this will solve the issue

masud-rana44 avatar May 07 '23 16:05 masud-rana44

Hi! You should need to move the "script(src='https://js.stripe.com/v3/')" script from tour.pug to base.pug, hopefully this will solve the issue

Worked, Can u explain what is causing the error, why is the stripe moduule not included, while others like Mapbox are, regards

Felixmurithi avatar Feb 01 '24 13:02 Felixmurithi