Refactor payment request handling to support role change top-ups
CI / Backend (build + test) (push) Successful in 1m19s
CI / Frontend (lint + typecheck + build) (push) Successful in 33s

- Updated the `PaymentRequest` model to include a new `Kind` property, distinguishing between `Subscription` and `RoleChangeTopUp` requests.
- Modified the `TelegramNotifier` to accommodate the new request type, ensuring accurate notifications for role change top-ups.
- Enhanced the `ConfirmPaymentRequestCommandHandler` to handle role change top-ups without extending the billing period, reflecting the new payment logic.
- Updated various application components and tests to support the new payment request structure and ensure proper functionality.
- Revised API documentation to clarify the behavior of role change top-ups and their impact on billing.
This commit is contained in:
Leonid Pershin
2026-07-19 16:45:17 +03:00
parent 0dcaf1203f
commit 5ff5224935
27 changed files with 1656 additions and 76 deletions
@@ -54,11 +54,13 @@ public interface ITelegramNotifier
);
/// <summary>Пользователь нажал «Я оплатил» — инлайн-кнопки «Подтвердить/Отклонить», решается
/// полностью в Telegram (аналогично заявке на роль).</summary>
/// полностью в Telegram (аналогично заявке на роль). Period задан только для Kind.Subscription —
/// для Kind.RoleChangeTopUp он null (доплата не привязана к тарифному периоду).</summary>
Task NotifyAdminsPaymentRequestedAsync(
Guid requestId,
string userName,
PaymentPeriod period,
PaymentRequestKind kind,
PaymentPeriod? period,
int amount,
CancellationToken cancellationToken
);