diff --git a/account/src/routers/payment-router.ts b/account/src/routers/payment-router.ts index 3e91e4c..9217c03 100644 --- a/account/src/routers/payment-router.ts +++ b/account/src/routers/payment-router.ts @@ -80,20 +80,12 @@ paymentRouter.post("/create-checkout-session", async (req, res, next) => { return next("not logged in"); } try { - const prices = await stripe.prices.list({ - expand: ['data.product'], - }); + const price = req.body.priceId; const session = await stripe.checkout.sessions.create({ billing_address_collection: 'auto', line_items: [ { - price: prices.data[0].id, - // For metered billing, do not pass quantity - quantity: 1, - }, - { - price: prices.data[1].id, - // For metered billing, do not pass quantity + price, quantity: 1, }, ], diff --git a/account/views/user.ejs b/account/views/user.ejs index 68279c2..434a3cd 100644 --- a/account/views/user.ejs +++ b/account/views/user.ejs @@ -63,13 +63,13 @@ <% if (user.tester) { %>

Upgrade to Student account for Wordlist features

- - + +
- + <% } %> <% } %> <% if (user.tester && user.level === "student") { %>