Skip to content

Commit

Permalink
Updated create-order and verify apis
Browse files Browse the repository at this point in the history
  • Loading branch information
ad956 committed May 30, 2024
1 parent 288c7f9 commit 25aee32
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion app/api/payment/create-order/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,5 @@ export async function POST(request: NextRequest) {
receipt: "rcp1",
};
const order = await razorpay.orders.create(options);
console.log(order);
return Response.json({ orderId: order.id }, { status: 200 });
}
2 changes: 1 addition & 1 deletion app/api/payment/verify/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const generatedSignature = (
razorpayOrderId: string,
razorpayPaymentId: string
) => {
const keySecret = process.env.key_secret;
const keySecret = process.env.RAZORPAY_KEY_SECRET;
if (!keySecret) {
throw new Error(
"Razorpay key secret is not defined in environment variables."
Expand Down

0 comments on commit 25aee32

Please sign in to comment.