fix: remove duplicate stripe route mount causing webhook body parsing issue

ISSUE:
Webhook signature verification failing with 'Payload was provided as a
parsed JavaScript object instead of raw Buffer'

CAUSE:
Line 43: app.use('/stripe/webhook', stripeRoutes) - raw body
Line 83: app.use('/stripe', stripeRoutes) - JSON parsed body
Same router mounted twice at different paths caused JSON parser to run

FIX:
Removed line 83 duplicate mount
Webhook stays at /stripe/webhook with raw body parsing
Checkout stays at /stripe/create-checkout-session

FILES MODIFIED:
- services/arbiter-3.0/src/index.js (-1 line)

TESTING:
Complete Stripe test checkout, webhook should process successfully

Signed-off-by: Claude (Chronicler #57) <claude@firefrostgaming.com>
This commit is contained in:
Claude (Chronicler #57)
2026-04-03 16:49:13 +00:00
parent 0abd86b1a9
commit a86d6b9c45

View File

@@ -80,7 +80,6 @@ const csrfProtection = csrf({ cookie: false });
app.use('/auth', authRoutes);
app.use('/admin', csrfProtection, adminRoutes);
app.use('/webhook', webhookRoutes);
app.use('/stripe', stripeRoutes); // Other Stripe routes (checkout, portal)
// Start Application
const PORT = process.env.PORT || 3500;