Skip to content

Commit

Permalink
port change
Browse files Browse the repository at this point in the history
  • Loading branch information
swatimoluguri committed May 17, 2024
1 parent 6cb92c2 commit 050820f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ const {
RAZORPAY_KEY_ID,
RAZORPAY_KEY_SECRET,
PORT,
CLIENT_PORT
} = process.env;

const razorpay = new Razorpay({
Expand Down Expand Up @@ -218,7 +219,7 @@ app.post("/checkout/payment-verification", async (req, res) => {
}
);
await cartModel.deleteMany({ userId: req.userId });
res.redirect(`http://localhost:3000/success?payment_id=${razorpay_payment_id}`);
res.redirect(`${CLIENT_PORT}/success?payment_id=${razorpay_payment_id}`);
} else {
res.redirect("/failed");
}
Expand Down

0 comments on commit 050820f

Please sign in to comment.