feat: YooKassa webhook, payment timeout, reserved status, BookingConfirmPage
- Add YooKassa webhook handler (POST /api/yookassa/webhook) that updates booking to confirmed+paid on payment.succeeded, cancelled on payment.canceled - Add public status endpoint GET /api/online-bookings/:id for return URL polling - Add 'reserved' booking status (violet) shown in calendar while awaiting payment - Add 'website' to BookingSource type - Payment timeout job (every 2 min) auto-cancels expired unpaid bookings - Widget setting: "Время ожидания оплаты" (5–60 min, default 15) - BookingConfirmPage at /booking-confirm/:id — polls status, countdown timer, shows success/pending/cancelled state - Widget bookings now use status='reserved' instead of 'inquiry' when YooKassa is configured; set to 'confirmed' by webhook on payment.succeeded - Migration 070: add 'reserved' to bookings status constraint + payment_expires_at Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -19,6 +19,7 @@ export function BookingWidgetStandalonePage() {
|
||||
showRental: searchParams.get('rental') === 'true',
|
||||
roomDisplayMode: (searchParams.get('mode') ?? 'rooms') as 'rooms' | 'categories',
|
||||
minNights: parseInt(searchParams.get('min-nights') ?? '1') || 1,
|
||||
paymentTimeout: 15,
|
||||
paymentProvider: 'yukassa',
|
||||
showPromo: searchParams.get('promo') !== 'false',
|
||||
allowExtraBeds: searchParams.get('extra-beds') !== 'false',
|
||||
|
||||
Reference in New Issue
Block a user