<?php
// ============================================================
//  signup-submit.php — final step of the signup wizard
// ============================================================
//
//  As of Phase 2g, member creation, Zoho contact creation, and
//  auto-login all happen on STEP 2 of the wizard via the
//  signup-validate.php AJAX endpoint.
//
//  By the time the user clicks "Pay & activate membership" on
//  Step 3, they're already a logged-in member. This file just
//  routes them to checkout. Kept as a redirect target so any
//  bookmarks / direct links to /signup-submit.php still work.
// ============================================================

require_once __DIR__ . '/includes/auth.php';
require_once __DIR__ . '/includes/config.php';

if (auth_member_check()) {
    header('Location: ' . SITE_URL . '/member/checkout-membership.php?new=1');
    exit;
}

// Not logged in — fall back to the signup form
header('Location: ' . SITE_URL . '/become-member.php');
exit;