feat(lava): автопродление Lava на странице подписки

Парная фронтовая часть к эндпоинтам /cabinet/subscription/lava-recurrent
(бот: 0dea2182). Блок — сиблинг Platega-блока с той же семантикой состояний
(off/pending/active/past_due), поллинг раз в 8с пока привязка PENDING.

Отличие от Platega в подписи: у Lava период задан продуктом в кабинете
провайдера и приезжает числом дней, поэтому канонические значения (30/90/365
и т.д.) показываются словами, а произвольные — как «раз в N дн.».

utils/lavaRecurring.ts: строгое распознавание 403 'Lava recurrent disabled'
(другие 403-guard'ы прятать нельзя), деградация неизвестного статуса в off.
Локали ru/en/zh/fa (+25 строк каждая, плейсхолдеры сверены). 7 тестов утилиты.
This commit is contained in:
Fringg
2026-07-29 16:34:43 +03:00
parent 62aaa5d7c9
commit 2dce539da2
9 changed files with 474 additions and 0 deletions

View File

@@ -701,6 +701,31 @@
"purchaseButton": "⚡ Subscribe with SBP auto-payment",
"purchaseHint": "First charge confirms the binding in your bank app; renewals are charged automatically per the tariff cadence."
},
"lavaRecurring": {
"title": "Lava auto-renewal",
"connect": "Connect",
"payFirst": "Pay the first invoice",
"cancel": "Disable",
"confirmCancel": "Disable Lava auto-renewal? The subscription will no longer renew automatically.",
"cancelled": "Lava auto-renewal disabled",
"enableError": "Could not enable Lava auto-renewal",
"cancelError": "Could not disable Lava auto-renewal",
"statusPending": "Waiting for the first invoice to be paid",
"statusActive": "Active",
"statusPastDue": "Payment failed — please try again",
"nextCharge": "next charge on {{date}}",
"amountPerPeriod": "{{amount}} ₽ {{period}}",
"amountPerDays": "{{amount}} ₽ every {{days}} days",
"period": {
"day": "daily",
"week": "weekly",
"month": "monthly",
"quarter": "quarterly",
"halfYear": "every six months",
"year": "yearly"
},
"autopayHint": "The subscription will renew automatically via Lava"
},
"backToList": "Back to subscriptions",
"confirmDelete": "Delete subscription?",
"dailyAutoCharge": "Daily auto-charge",