How panhavathgit/bakong_telegram_payment works
This is a Flask microservice for creating Bakong QR payment strings and reporting payment outcomes to Telegram. The main workflow is a client request to generate a QR, followed by a background polling worker that checks payment status and sends transaction details—or a timeout notification—to Telegram. The API also exposes a payment-status check. The Bakong wrapper includes deeplink, payment-info, and bulk-check operations. Polling and notification behavior are visible in the API excerpt; no unsampled implementation is assumed.
Main entry points: bakong_service.py Bakong Operations · endpoints.py Flask Endpoints · telegram_bot_service.py Telegram Sender · env.py Bakong Credentials
Components 9
HTTP API
- Flask Endpoints
api/endpoints.py - Payment Poller
api/endpoints.py
Bakong Payments
- Bakong Operations
services/bakong_service.py
Telegram Notifications
- Telegram Sender
services/telegram_bot_service.py
Configuration
- Bakong Credentials
utils/env.py - Telegram Credentials
utils/env.py
Other components
- Backend Client
- Bakong Service
- Telegram Bot API
Connections 12
- Backend Client → Flask Endpoints: requests QR
README.md - Flask Endpoints → Bakong Operations: creates QR
api/endpoints.py - Flask Endpoints → Bakong Operations: hashes QR
api/endpoints.py - Flask Endpoints → Payment Poller: starts worker
api/endpoints.py - Flask Endpoints → Bakong Operations: checks status
api/endpoints.py - Payment Poller → Bakong Operations: checks payment
api/endpoints.py - Payment Poller → Bakong Operations: gets details
api/endpoints.py - Payment Poller → Telegram Sender: sends outcome
api/endpoints.py - Bakong Operations → Bakong Credentials: reads settings
services/bakong_service.py - Telegram Sender → Telegram Credentials: reads credentials
services/telegram_bot_service.py - Bakong Operations → Bakong Service: uses SDK
- Telegram Sender → Telegram Bot API: posts message
services/telegram_bot_service.py