's'
This commit is contained in:
@@ -104,7 +104,15 @@ export async function POST(request: NextRequest) {
|
||||
|
||||
const payConfig = getPaymentConfig();
|
||||
const apiUrl = payConfig.apiUrl.replace(/\/$/, "");
|
||||
const user_id = String(body?.user_id || "").trim();
|
||||
let user_id = String(body?.user_id || "").trim();
|
||||
if (user_id.startsWith("{") && user_id.includes("data")) {
|
||||
try {
|
||||
const parsed = JSON.parse(user_id) as { data?: string };
|
||||
if (parsed?.data) user_id = String(parsed.data).trim();
|
||||
} catch {
|
||||
/* ignore */
|
||||
}
|
||||
}
|
||||
const return_url = String(body?.return_url || "").trim();
|
||||
const total_fee = Number(body?.total_fee) || 180;
|
||||
const type = String(body?.type || "vip");
|
||||
|
||||
Reference in New Issue
Block a user