import { NextRequest, NextResponse } from 'next/server';

export async function GET(req: NextRequest) {
  const { searchParams } = new URL(req.url);
  const orderId = searchParams.get('orderId');
  return NextResponse.redirect(new URL(`/checkout?error=PaymentCancelled&orderId=${orderId}`, req.url));
}

export const dynamic = 'force-dynamic';
