This commit is contained in:
eric
2026-03-10 01:35:37 -05:00
parent ff51622bb6
commit be7a298604
69 changed files with 11016 additions and 57 deletions

View File

@@ -0,0 +1,15 @@
import { NextRequest, NextResponse } from "next/server";
import { getOrderStatus } from "@/lib/sdk";
export async function GET(request: NextRequest) {
const orderId = request.nextUrl.searchParams.get("order_id");
if (!orderId) {
return NextResponse.json({ ok: false, error: "缺少 order_id" }, { status: 400 });
}
try {
const { paid } = await getOrderStatus(orderId);
return NextResponse.json({ ok: true, paid });
} catch (e) {
return NextResponse.json({ ok: false, paid: false, error: String(e) }, { status: 500 });
}
}