From 8d00259af53e0ceb22c48a11c10494464a8e7743 Mon Sep 17 00:00:00 2001 From: Leon Xu Date: Sat, 7 May 2022 15:00:02 -0700 Subject: [PATCH] fix: spelling errors in API routes --- functions/index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/functions/index.js b/functions/index.js index 4dc38f3..e16f05e 100644 --- a/functions/index.js +++ b/functions/index.js @@ -11,8 +11,9 @@ app.use(cors({ origin: true })); app.use(express.json()); // API Routes -app.post("/paymens/create", async (req, res) => { - const total = request.query.total; +app.post("/payments/create", async (req, res) => { + const total = req.query.total; + const paymentIntent = await stripe.paymentIntents.create({ amount: total, // subunits of the currency currency: "usd",