From da00817174525e98552987f28e9aa8d58201572b Mon Sep 17 00:00:00 2001 From: justin Date: Fri, 29 May 2026 15:55:41 -0500 Subject: [PATCH] Show DOT# or FRN in Telegram order notifications Reads dot_number or frn from intake_data and includes in the notification. DOT orders show DOT#, FCC orders show FRN. Co-Authored-By: Claude Opus 4.6 (1M context) --- api/src/routes/checkout.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/api/src/routes/checkout.ts b/api/src/routes/checkout.ts index c64eee6..f4c85cd 100644 --- a/api/src/routes/checkout.ts +++ b/api/src/routes/checkout.ts @@ -1282,9 +1282,17 @@ export async function handlePaymentComplete( const discountLine = discountCents > 0 ? `Discount: -$${(discountCents / 100).toFixed(2)} (${order.discount_code || "promo"})\n` : ""; + // Show DOT# or FRN/CORES ID depending on service type + const intake = (typeof order.intake_data === "object" && order.intake_data) || {}; + const dotNumber = (intake as any).dot_number || ""; + const frn = (intake as any).frn || ""; + const idLine = dotNumber ? `DOT#: ${dotNumber}\n` + : frn ? `FRN: ${frn}\n` + : ""; const msg = `💰 NEW ORDER\n\n` + `Customer: ${customerName}\n` + `Email: ${customerEmail}\n` + + idLine + `Service: ${serviceName}\n` + `Total: $${totalDollars}\n` + discountLine