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:
@@ -52,6 +52,7 @@ import { DepositSettingsPage } from './pages/DepositSettingsPage'
|
||||
import { DepositHistoryPage } from './pages/DepositHistoryPage'
|
||||
import { PayDepositPage } from './pages/PayDepositPage'
|
||||
import { BookingWidgetStandalonePage } from './pages/BookingWidgetStandalonePage'
|
||||
import { BookingConfirmPage } from './pages/BookingConfirmPage'
|
||||
import { ModuleGuard } from './components/ModuleGuard'
|
||||
|
||||
export default function App() {
|
||||
@@ -71,6 +72,7 @@ export default function App() {
|
||||
<Route path="/room-service/:slug" element={<GuestRoomServicePage />} />
|
||||
<Route path="/:slug/pay" element={<PayDepositPage />} />
|
||||
<Route path="/:slug/book" element={<BookingWidgetStandalonePage />} />
|
||||
<Route path="/booking-confirm/:id" element={<BookingConfirmPage />} />
|
||||
|
||||
{/* PMS routes */}
|
||||
<Route element={<AppLayout />}>
|
||||
|
||||
Reference in New Issue
Block a user