Skip to content

feat: enhance Telegram notifications#38

Merged
Arch0998 merged 1 commit into
developfrom
feature/telegram-paid
Sep 24, 2025
Merged

feat: enhance Telegram notifications#38
Arch0998 merged 1 commit into
developfrom
feature/telegram-paid

Conversation

@Arch0998
Copy link
Copy Markdown
Owner

Notification improvements:

  • Added a new Celery task notify_successful_payment in notifications/tasks.py to send detailed Telegram notifications when a payment is completed, including user, book, payment amount, type, and status.
  • Enhanced the formatting and content of borrowing and overdue notifications in notifications/tasks.py to include user full name, book details, daily fee, and days overdue, using clearer and more informative messages.

Payment processing reliability:

  • Updated payment status changes in payments/views.py to use database transactions and row-level locking (select_for_update) for atomicity and consistency. Notifications for successful payments are now triggered only after the status is updated.
  • Imported the new notification task into payments/views.py to enable asynchronous notification after payment success.
  • Added the transaction import to payments/views.py to support atomic database operations during payment status updates.

@Arch0998 Arch0998 merged commit d3a6475 into develop Sep 24, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant