diff --git a/src/main.el b/src/main.el index ff16ee4..b3fb60c 100644 --- a/src/main.el +++ b/src/main.el @@ -146,6 +146,10 @@ fn persist_founding_count(sold: Int) { // ── Page assembly ───────────────────────────────────────────────────────────── fn page(sold: Int, total: Int) -> String { + // Page order is the source of truth; nav must mirror it section-for-section. + // Pricing is intentionally last so a visitor can scroll the whole story + // (what / how / why / who-it's-for / safety / planet) before being asked + // to commit to a plan. return page_open() + nav() + hero() @@ -159,9 +163,9 @@ fn page(sold: Int, total: Int) -> String { + local_first() + safety() + environmental() - + pricing(sold, total) + marketplace() + viral() + + pricing(sold, total) + footer() + page_close() } @@ -521,11 +525,23 @@ fn handle_request(method: String, path: String, body: String) -> String { } } - // 3. Attach customer + receipt_email to the PaymentIntent + // 3. Attach customer to the live Intent. SetupIntents (seti_*) and + // PaymentIntents (pi_*) live at different REST endpoints, so + // branch on the id prefix. SetupIntents do not accept + // receipt_email - that's a PaymentIntent-only field. if !str_eq(lc_cus_id, "") { - let lc_attach_body: String = "customer=" + lc_cus_id + "&receipt_email=" + lc_email_enc - let lc_attach_url: String = "https://api.stripe.com/v1/payment_intents/" + lc_pi_id - let lc_attach: String = http_post_form_auth(lc_attach_url, lc_attach_body, lc_auth) + let lc_is_setup: Bool = str_starts_with(lc_pi_id, "seti_") + let lc_attach_url: String = if lc_is_setup { + "https://api.stripe.com/v1/setup_intents/" + lc_pi_id + } else { + "https://api.stripe.com/v1/payment_intents/" + lc_pi_id + } + let lc_attach_body: String = if lc_is_setup { + "customer=" + lc_cus_id + } else { + "customer=" + lc_cus_id + "&receipt_email=" + lc_email_enc + } + let _lc_attach: String = http_post_form_auth(lc_attach_url, lc_attach_body, lc_auth) } // 4. Upsert the Supabase waitlist row so /account can find this purchase by email diff --git a/src/nav.el b/src/nav.el index 3449818..7b34f27 100644 --- a/src/nav.el +++ b/src/nav.el @@ -9,8 +9,11 @@ fn nav() -> String {
\"Neuron\" +
- How it works + How it works + Enterprise
@@ -19,9 +22,8 @@ fn nav() -> String { Environment
+ Marketplace Pricing - Marketplace - Enterprise About Gallery Account @@ -36,11 +38,12 @@ fn nav() -> String {