new-site/api/src/routes
justin 68e6b60951 fix: worker emails (localhost:25 -> SMTP relay) + create ERPNext SO on webhook payment
Two bugs found tracing Mitchell Allen's batch CB-95BA6C90 (5 DOT services, card):

1) Worker authorization/signing-link/status emails were sent via
   smtplib.SMTP('localhost', 25), which has no MTA in the workers container ->
   every send failed '[Errno 111] Connection refused', so customers never got
   their e-sign links and orders sat 'awaiting client signature' forever. Routed
   all 9 hardcoded localhost:25 sites (state_trucking, mcs150_update, boc3_filing,
   hazmat_phmsa, mailbox_setup, dot_esign, completion_emails) through the
   authenticated SMTP relay (SMTP_HOST/PORT/STARTTLS/login) + added a shared
   worker_email.send_worker_email helper.

2) The ERPNext Sales Order for compliance/compliance_batch was only created in
   the /checkout/create-session endpoint, but CARD orders confirm via the Stripe
   WEBHOOK -> handlePaymentComplete, which never created the SO. Result: every
   webhook-confirmed order had erpnext_sales_order=NULL and workers logged
   'Sales Order not found 404' then built from PG. Added idempotent
   ensureComplianceSalesOrder() to handlePaymentComplete so ALL payment methods
   (card-webhook, PayPal, crypto) create + link the SO.
2026-06-09 14:40:46 -05:00
..
admin-crypto.ts Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
admin.ts Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
agents.ts Allow multiple referral codes per sales agent 2026-06-02 14:44:22 -05:00
amb-locations.ts Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
bundles.ts Rename 'IPES & ISP Registrations' to 'FCC Carrier / ISP Registration' 2026-04-29 08:06:47 -05:00
canada-crtc.ts Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
cdr.ts Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
checkout.ts fix: worker emails (localhost:25 -> SMTP relay) + create ERPNext SO on webhook payment 2026-06-09 14:40:46 -05:00
compliance-orders.ts fix(checkout): trucking new-carrier ordered the wrong (telecom) product + ACH broke 2026-06-08 23:42:36 -05:00
corp-status.ts Fix corp search LIMIT type: cast to int 2026-04-28 23:05:43 -05:00
discounts.ts Fix: add allowed_emails to DiscountCode TypeScript interface 2026-05-22 01:19:12 -05:00
dot-lookup.ts intake: prefill order form from ?dot= campaign CTA links 2026-06-02 12:46:33 -05:00
entities.ts Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
esign-sign-consent.ts esign: make signing copy fully generic - remove all ink references from website/API 2026-06-07 05:06:26 -05:00
fcc-carrier-registration.ts Add referral/discount code to FCC carrier page + REF-JAYK05 agent 2026-06-02 14:31:22 -05:00
fcc-filings.ts Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
fcc-lookup.ts Fix: FCC errors now fall through to local DB fallback 2026-05-22 00:42:43 -05:00
foreign-qualification.ts Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
formations.ts Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
health.ts Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
icc.ts Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
id-upload.ts add blur detection + Ollama ID validation + corporate check for all carriers 2026-05-30 19:17:31 -05:00
identity.ts Fix 6 bugs found in compliance and checkout flows 2026-04-27 09:56:12 -05:00
lnpa-regions.ts Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
npi-lookup.ts feat(healthcare): prove revalidation is real via official CMS data + self-verify 2026-06-07 23:54:01 -05:00
order-timeline-status.ts Wire fulfillment alerts to Telegram + surface order progress in portal + even out ERPNext sync 2026-06-07 03:17:46 -05:00
order-timeline.ts esign: make signing copy fully generic - remove all ink references from website/API 2026-06-07 05:06:26 -05:00
payment-methods.ts Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
paypal.ts Fix PayPal capture for compliance orders + MCS-150 form generator 2026-05-30 11:34:16 -05:00
portal-auth.ts Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
portal-esign-generic.ts esign: make signing copy fully generic - remove all ink references from website/API 2026-06-07 05:06:26 -05:00
portal-esign.ts Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
portal-rmd-review.ts Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
portal-setup.ts Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
portal.ts Wire fulfillment alerts to Telegram + surface order progress in portal + even out ERPNext sync 2026-06-07 03:17:46 -05:00
puc.ts Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
quotes.ts Add Telegram notifications for tickets, quotes, and insurance leads 2026-05-30 16:35:11 -05:00
refunds.ts Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
reseller-certs.ts Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
subscribe.ts Add interest field to mailing list subscribe (telecom/trucking/formation) 2026-05-29 12:50:27 -05:00
survey.ts post-completion flow: survey, referral program, review ask 2026-05-30 21:22:14 -05:00
telecom-entities.ts Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
tickets.ts trucking wrap-up: close-out becomes a paid order + workflow 2026-05-31 01:01:02 -05:00
webhooks.ts Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00