2021-09-14
4549
#ecommerce#react
Ovie Okeh
9609
Sep 14, 2021 â‹… 16 min read

React and Stripe payment system tutorial

Ovie Okeh Programming enthusiast, lover of all things that go beep.

Recent posts:

Understanding env variables and containers in Astro 4.10

Astro, renowned for its developer-friendly experience and focus on performance, has recently released a new version, 4.10. This version introduces […]

Peter Ekene Eze
Sep 10, 2024 â‹… 9 min read

Build an image editor with Fabric.js v6

In web development projects, developers typically create user interface elements with standard DOM elements. Sometimes, web developers need to create […]

Shalitha Suranga
Sep 9, 2024 â‹… 12 min read

Creating toast notifications using Solid Toast

Toast notifications are messages that appear on the screen to provide feedback to users. When users interact with the user […]

Chimezie Innocent
Sep 6, 2024 â‹… 7 min read
Deno Adoption Guide: Overview, Examples, And Alternatives

Deno adoption guide: Overview, examples, and alternatives

Deno’s features and built-in TypeScript support make it appealing for developers seeking a secure and streamlined development experience.

Emmanuel Odioko
Sep 5, 2024 â‹… 10 min read
View all posts

12 Replies to "React and Stripe payment system tutorial"

  1. hey ovie, I follow along your tutorial but running the npm run dev is not display the app instead it is showing “Error: ENOENT: no such file or directory, stat ‘D:\document-disk(d)\Stripe\react-stripe-payment\build\index.html”. I clone from your GitHub the project but it is the same error. Could you look in to it. thanks

    1. Hi Ermias,

      Sorry for the error you encountered. Run `npm run build` and then run `npm run dev`. Go to localhost:7000 to see the application.

      That would help.

  2. Thanks, Ovie! Such a beautiful explanation.

    A small tip for a question that may arise at any time from a reader: if you’re getting the “secret key” from your environment (since you’re using dotenv) when initializing your stripe, remember to call the `dotenv.config()` before importing your `stripe.js` module, so that environment variables can be processed before being used.

    1. Fill in 4242 4242 4242 4242 for the Card details field

      The checkout page will display a “Payment Successful!” UI.

  3. This method has a security issue, the frontend is setting the amount, so I can basically pay via API and choose the amount I want, I also could rewrite you array of products to put 0 amount.

Leave a Reply