Skip to content

Commit

Permalink
Moving razorpay keys to .env
Browse files Browse the repository at this point in the history
  • Loading branch information
redoC-A2k committed Feb 4, 2024
1 parent 4daf0c7 commit d220203
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions server/routes/order.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@ const logger = require("../services/logger")
const router = express.Router();
const Razorpay = require("razorpay");
const User = require("../models/userModel");
require('dotenv').config()

router.post("/order", (req, res) => {
const { amount } = req.body;
let instance = new Razorpay({
key_id: "rzp_test_hGL6N8M5oGjVNF",
key_secret: "aLqp68YlksSJz8swKCUIKVkc",
key_id: process.env.RAZORPAY_KEY_ID,
key_secret: process.env.RAZORPAY_KEY_SECRET,
});
let options = {
amount: amount,
Expand Down

0 comments on commit d220203

Please sign in to comment.