This is an e-commerce web application built with the MERN (MongoDB, Express.js, React.js, Node.js) stack. The application includes features like user authentication, product search, cart management, and handling of ordered and refunded products.
-
User Authentication: Secure login and signup functionality.
-
Product Search: Search products and view product details.
-
Cart Management: Add and remove products from the cart.
-
Order Management: View ordered and refunded products.
-
Responsive Design: Fully responsive layout for all devices.
-
Frontend: React.js
-
Backend: Node.js, Express.js , Razorpay
-
Database: MongoDB
-
Styling: CSS, CSS Modules
-
Node.js
-
npm or yarn
-
MongoDB
-
bashCopy codegit clone https://github.com/roy7077/payment-gateway.gitcd ecommerce-app
-
bashCopy codecd servernpm install
-
bashCopy codecd ../clientnpm install
Create a .env file in the server directory and add the following environment variables:
MONGO_URI=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret
RAZORPAY_KEY_ID=your_razorpay_key_id
RAZORPAY_KEY_SECRET=your_razorpay_key_secret `
-
bashCopy codecd server npm start
-
bashCopy codecd ../client npm start
-
POST /api/v1/signup - Register a new user
-
POST /api/v1/login - Authenticate user and get token
-
GET /api/v1/getkeyid - Get Razorpay Key ID
-
POST /api/v1/capturepayment - Capture payment
-
POST /api/v1/refundpayment - Refund payment
-
GET /api/v1/fetchallpayments - Fetch all payments
-
GET /api/v1/getpaymentdetails/:id - Get payment details by ID
-
GET /api/v1/fetchcarddetails - Fetch card details
-
POST /api/v1/paymentverification - Verify payment
-
POST /api/v1/addtocart - Add product to cart
-
DELETE /api/v1/removefromcart - Remove product from cart
-
POST /api/v1/showcartitems - Show all cart items
-
POST /api/v1/orderedproducts - Show all ordered products
-
POST /api/v1/refundedproducts - Show all refunded products
![Ecommerce_DB](https://private-user-images.githubusercontent.com/107414907/350797859-c8e92ab8-3088-4f8a-902e-35a5d62f8fa7.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjMzNzE2NTgsIm5iZiI6MTcyMzM3MTM1OCwicGF0aCI6Ii8xMDc0MTQ5MDcvMzUwNzk3ODU5LWM4ZTkyYWI4LTMwODgtNGY4YS05MDJlLTM1YTVkNjJmOGZhNy5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwODExJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDgxMVQxMDE1NThaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0yMTVkYWI4ODM0NzU3MTI1YjhmYThiOWU3NjhkOGZiM2RmYWU3YzhiMzhiMDJiOGFiYTQ0M2NhODZlYTM3ZGJkJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.IFmzZqaX0wxBFl-gahjuqKH11FOGZBh2sxrKe0APDhY)
Feel free to submit issues or pull requests if you have suggestions or improvements.
This project is licensed under the MIT License.