- Widget white page fix: fallback photo when real rooms have no photos array - Long-stay deposits: if booking > threshold days and toggle on → full charge instead of hold (bypasses YooKassa 7-day limit) - DepositSettingsPage: toggle + day threshold input for long-stay full payment - Refund endpoint: POST /deposit/refund supports full and partial refunds via YooKassa refunds API - DepositWidget: refund UI for yookassa_charge deposits (full/partial, shows remaining amount) - partially_refunded status support with badge and "Вернуть ещё" button - Auto-confirm: webhook now auto-confirms booking status on payment.succeeded for widget bookings - PaymentSettingsPage: auto-confirm toggle per gateway (shown when booking-widget module active) - Migration 067: long_stay columns on hotel_deposit_settings, auto_confirm_on_payment on gateways, refunded_amount on deposits Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
13 lines
618 B
SQL
13 lines
618 B
SQL
-- Long-stay: charge full deposit amount instead of hold (bypass 7-day YooKassa limit)
|
|
ALTER TABLE hotel_deposit_settings
|
|
ADD COLUMN IF NOT EXISTS long_stay_full_payment BOOLEAN NOT NULL DEFAULT false,
|
|
ADD COLUMN IF NOT EXISTS long_stay_threshold_days INT NOT NULL DEFAULT 7;
|
|
|
|
-- Auto-confirm booking on successful online payment (per payment gateway)
|
|
ALTER TABLE hotel_payment_gateways
|
|
ADD COLUMN IF NOT EXISTS auto_confirm_on_payment BOOLEAN NOT NULL DEFAULT true;
|
|
|
|
-- Track refunded amount for captured (charged) deposits
|
|
ALTER TABLE booking_deposits
|
|
ADD COLUMN IF NOT EXISTS refunded_amount NUMERIC(12,2);
|