Commit Graph

48 Commits

Author SHA1 Message Date
3adcc90b74 chore(docker): remove exposed PostgreSQL port from compose 2026-06-17 15:45:01 +07:00
93f05e46b5 feat(bot): implement HWID device list and deletion 2026-06-17 15:40:35 +07:00
agony
edfe1e6874 feat(subs): UNFINISHED hwid control 2026-06-16 16:24:02 +07:00
greendevilll
7ab2293fe2 fix(notifications): multiply duration days by 30 for admin log accuracy 2026-06-06 23:49:41 +07:00
9552813f16 fix(autorenewal): remove duplicated response handling in toggle_autorenewal 2026-06-04 13:44:09 +07:00
4c5a16a3ca feat(admin): add admin notification system for deposits, purchases, and renewals 2026-06-04 12:35:32 +07:00
5ec9491e22 feat(pally): support customer-pays-fees scenario with BalanceAmount validation 2026-05-31 15:23:31 +07:00
18f994aed9 fix(pally): use InvId as primary bill identifier instead of custom field 2026-05-31 15:17:48 +07:00
936d1ad260 fix(api): enhance pally webhook with comprehensive error handling and logging 2026-05-31 15:11:54 +07:00
2a0f5c454e debugging 2026-05-31 14:53:49 +07:00
2103e6a882 Revert to b5976d0b21 2026-05-31 14:47:53 +07:00
102a0ebf96 fix(pally): strip 'payment-' prefix from InvId before database lookup 2026-05-31 14:44:43 +07:00
18f4997ca6 fix(pally): use InvId instead of custom field for order ID lookup 2026-05-31 14:37:34 +07:00
b5976d0b21 fix(pally): align webhook handler with official API spec 2026-05-31 14:25:05 +07:00
763e041a8b fix(api): change pally webhook endpoint from /success to /result 2026-05-31 14:14:17 +07:00
f9d3fbf937 refactor(api): update pally webhook endpoint path 2026-05-31 14:05:27 +07:00
a02af3b0f0 chore(docker): bind pally service port to localhost only 2026-05-31 13:16:04 +07:00
a0c8167da6 chore(docker): use .env instead of prod.env 2026-05-31 12:56:07 +07:00
717a1549e9 feat(ui): enhance text formatting with premium emojis and improve FAQ clarity 2026-05-24 15:43:54 +07:00
18866fc645 chore(texts): reorder constants and remove outdated mapping section 2026-05-23 21:26:20 +07:00
1228ec8b56 refactor(autorenewal): clean up imports and simplify error handling 2026-05-18 17:58:34 +07:00
a9a650f37b feat(config): mask sensitive credentials with SecretStr type 2026-05-18 17:48:34 +07:00
56f10d19c5 feat(autorenewal): implement automatic subscription renewal system 2026-05-18 17:32:04 +07:00
281a460974 refactoring: polished some files, .env.example update 2026-05-18 17:00:17 +07:00
acb8662a66 Refactor bot handlers and keyboards; implement admin features
- Removed unused prehandling, referrals, support, and states files.
- Updated admin and client handlers to improve structure and functionality.
- Introduced admin filters and routers for better access control.
- Added new billing and deposit functionalities for client interactions.
- Enhanced keyboard layouts for admin and client menus.
- Implemented promotion handling for admin users.
- Updated configuration to include admin settings.
- Improved utility functions for quote fetching and menu text building.
- Added common handlers for undefined commands and message deletions.
2026-05-13 10:34:06 +07:00
e9f84d9377 fix: enhance insufficient funds message and update subscription controls logic 2026-05-03 07:03:53 +07:00
ac61cec78c fix: added proxy support for the API telegram bot instance + removed deprecated plans 2026-05-02 13:51:27 +07:00
db2dabed58 feat: implement subscription management and billing enhancements 2026-04-29 20:10:26 +07:00
120e19e667 fix: fixed migration issues 2026-04-27 22:07:35 +07:00
fc656c5944 feat: remove exposed PostgreSQL port from docker-compose 2026-04-27 21:47:25 +07:00
287f8eebda feat: add subscription and transaction repositories
- Implemented SubscriptionRepository with methods to get, create, and update subscriptions.
- Added BalanceTXRepository for creating and retrieving balance transactions.
- Introduced a test script for simulating Pally webhook for local testing.
2026-04-27 21:33:25 +07:00
049f31118d feat: Implement payment notification system and API structure
- Added notifications for successful payments in `api/core/notifications.py`.
- Created main API entry point in `api/main.py` with FastAPI integration.
- Established routing structure in `api/routes/__init__.py` and `api/routes/pally.py` for handling payment callbacks.
- Developed billing handlers in `bot/handlers/billing.py` and `bot/handlers/buy.py` for subscription management.
- Introduced state management for user interactions in `bot/states/`.
- Created user interface elements in `bot/keyboards/` for navigation and payment processing.
- Set up middleware for dependency injection in `bot/middlewares/di.py`.
- Added support for user commands and interactions in `bot/handlers/common.py` and `bot/handlers/support.py`.
- Implemented logging and error handling throughout the bot's functionality.
- Created entry point script for API server in `entrypoints/api.sh`.
2026-04-24 17:41:42 +07:00
d98383285e feat: implement billing system with Pally integration
- Added billing models and repository for handling bills.
- Introduced BillingService to manage payment initiation and bill creation.
- Updated user service to remove ticket-related functionality.
- Refactored settings to include new billing-related fields.
- Removed ticket-related handlers and schemas.
- Added new billing handlers for processing payments.
- Updated database schema with new bills table and status enum.
- Enhanced utility functions to calculate prices considering discounts.
- Introduced prehandling for non-private messages.
- Updated main application to initialize new billing services and repositories.
2026-04-23 19:55:51 +07:00
8290d18235 feat: update support button to link directly to support bot 2026-04-22 20:44:26 +07:00
76fd6eb9a8 feat: update support keyboard with new support URL and replace return to menu button 2026-04-22 18:35:30 +07:00
e3e204d7af feat: enhance subscription management with discount calculations and update support messages 2026-04-22 17:41:44 +07:00
97c187bafb refactor: streamline referral payment message and improve text clarity 2026-04-18 22:47:24 +07:00
78a0ef9750 feat: implement referral payment system and enhance ticket management 2026-04-18 22:34:15 +07:00
3d19d9189b feat: add /support command and improve fallback message
- Add `/support` command handler to initiate support flow via direct command
  (previously only accessible via callback button)
- Update `UNDEFINED_MESSAGE` to guide users toward `/support` and `/start`
  when they use undefined commands
2026-04-15 20:36:49 +07:00
606aa4b89f feat: add admin promotion broadcast system and psql health check
- Add `/push` command for admins to broadcast messages to all users
  with approve/decline confirmation flow (handlers/ads.py)
- Add common handler for undefined commands and delete callback
- Add `UserRepository.get_users()` to fetch all users
- Add `UserService.send_promotion_to_users()` with error logging
- Add promotion confirmation keyboard and FSM state
- Add PostgreSQL availability check in startup.sh before migrations
- Add new text constants for promotion flow
2026-04-15 20:19:07 +07:00
0ac8ed8d64 Update project configuration and codebase 2026-04-12 12:19:53 +07:00
0ed0ad2b92 Add referral system and user balance tracking
Introduce balance field to User model with Alembic migration. Add
referral menu, admin /refpay command, and deep link sharing. Update
Dockerfile to multi-stage build and add Postgres service to compose.
Fix deep link parsing logic and conditional proxy initialization.
2026-04-10 22:20:53 +07:00
60de871e0c Add subscription link field to user model
- Add subscription_link column to users table (nullable, unique)
- Add SUBSCRIPTION_URL to config settings
- Update user creation to include subscription link from Remnawave
- Add support subscription ticket creation with formatted message
- Add "update link" button to main menu
- Refactor support subscription formatting to include user details
2026-04-09 21:09:29 +07:00
2bb12f2ff8 somethjijngs 2026-04-08 20:33:18 +07:00
1be4770afd fix: schemas + states 2026-04-08 19:35:23 +07:00
930fabc028 Implement buy flow and migrate DTOs to schemas
Move DTO definitions from dto/ to schemas/ and update imports.
Add buy handler with FSM state management for device selection,
whitelist toggling, and duration choice. Include pricing logic,
inline keyboards, and new configuration fields.
2026-04-08 19:34:25 +07:00
fc45816eba first com2 2026-04-08 17:10:36 +07:00
8a597f880f first commit 2026-04-05 21:06:43 +07:00