Skip to content

Instantly share code, notes, and snippets.

View hanif365's full-sized avatar

Md. Abu Hanif hanif365

View GitHub Profile
import { NextResponse } from "next/server";
export const POST = async (request) => {
const url = new URL(request.url);
const searchParams = new URLSearchParams(url.search);
const transactionId = searchParams.get("transactionId"); // Retrieves the value of the 'transactionId' parameter
console.log(transactionId);
return NextResponse.json({ transactionId: transactionId });