fix: booking widget payment flow and success message

- On API error: show error message instead of false success screen
- Success message: "Оплата прошла успешно" only when paidViaGateway=true (user actually clicked pay in YooKassa); otherwise "Бронирование принято. Менеджер свяжется с вами" or "Оплата на месте"
- Payment screen: simplified to YooKassa-only redirect (removed bank transfer variant)
- Removed bankDetails from WidgetSettings entirely (not needed per product decision)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-08 02:21:55 +03:00
parent bd27be72c1
commit 85b4ae4ee0
3 changed files with 32 additions and 101 deletions

View File

@@ -23,7 +23,6 @@ export function BookingWidgetStandalonePage() {
showPromo: searchParams.get('promo') !== 'false',
allowExtraBeds: searchParams.get('extra-beds') !== 'false',
allowChildren: searchParams.get('children') !== 'false',
bankDetails: '',
formFields: DEFAULT_FORM_FIELDS,
additionalServices: DEFAULT_SERVICES,
})
@@ -48,7 +47,6 @@ export function BookingWidgetStandalonePage() {
showPromo: ws.showPromo ?? prev.showPromo,
allowExtraBeds: ws.allowExtraBeds ?? prev.allowExtraBeds,
allowChildren: ws.allowChildren ?? prev.allowChildren,
bankDetails: ws.bankDetails ?? prev.bankDetails,
}))
} else {
setSettings(prev => ({ ...prev, hotelName: config.hotelName ?? prev.hotelName }))