Razorpay order verification + automatic confirmation emails#79
Conversation
|
@AnshAggarwal011 is attempting to deploy a commit to the agastya's projects Team on Vercel. A member of the Team first needs to authorize it. |
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||||||||||
|
@kris70lesgo please look inti it i have made changes for email notifictaion. Check in the below image: |
|
@AnshAggarwal011 resolve the conflicts and add the env in .env.example |
|
@kris70lesgo Sorry for the inconvenience. I’m currently out of station for 3 days and won’t be able to resolve the issue right now. Please merge it so that it can be reflected for Hacktoberfest. |
|
@AnshAggarwal011 nice work , i see u fixed the most part |

User description
This PR adds:
• /api/razorpay/create-order
• /api/razorpay/verify
• /api/notify/confirmation
PR Type
Enhancement, Tests
Description
Add Razorpay payment gateway integration with order creation and signature verification
Implement automatic order confirmation emails via Nodemailer SMTP
Create three new API routes for payment flow: create-order, verify, and notify/confirmation
Refactor payment.tsx component with complete payment handling logic for both COD and online payments
Add nodemailer dependency and update dashboard with improved UI/UX
Diagram Walkthrough
flowchart LR A["Payment Options"] --> B{Payment Method} B -->|COD| C["notify/confirmation API"] B -->|Online| D["create-order API"] D --> E["Razorpay Checkout"] E --> F["verify API"] F --> G["sendOrderEmail"] C --> G G --> H["Customer Email"]File Walkthrough
route.ts
Razorpay order creation endpointsrc/app/api/razorpay/create-order/route.ts
route.ts
Razorpay payment signature verification endpointsrc/app/api/razorpay/create-order/verify/route.ts
razorpay_signature
route.ts
Order confirmation email notification endpointsrc/app/api/notify/confirmation/route.ts
mailer.ts
Email service with Nodemailer SMTP integrationsrc/lib/mailer.ts
payment.tsx
Payment component with full Razorpay integrationsrc/components/payment.tsx
verification
amount, items)
methods
messages
responsive design
page.tsx
Dashboard with Shop Now button and routingsrc/app/dashboard/page.tsx
product
razorpay.ts
Razorpay SDK initializationsrc/lib/razorpay.ts
package.json
Add nodemailer email library dependencypackage.json