How ybunhong/bakong-intergrate works
This is a Fastify payment backend offering Bakong KHQR and ABA PayWay payment flows, transaction reporting, and Telegram payment alerts. The main flow is a client request to create a payment, a later payment check or provider callback, transaction recording, and notification. The source shows these route-to-module calls and integrations; no README is provided, and the in-memory transaction and pending-payment state is not durable storage.
Main entry points: telegram-webhook.ts Payment routes · server.ts Fastify server · khqr.ts KHQR payments · aba.ts ABA payments
Components 11
HTTP API
- Fastify server
src/server.ts - Payment routes
src/telegram-webhook.ts - Pending payments
src/telegram-webhook.ts - Transactions
src/telegram-webhook.ts
Payment Providers
- KHQR payments
src/khqr.ts - Bakong API
- ABA payments
src/aba.ts - ABA PayWay
Notifications
- Payment alerts
src/telegram-bot.ts - Telegram
Other components
- API client
Connections 10
- API client → Fastify server: sends requests
- Fastify server → Payment routes: registers routes
src/server.ts - Payment routes → KHQR payments: generates and checks
src/telegram-webhook.ts - Payment routes → Pending payments: records and checks
src/telegram-webhook.ts - Payment routes → Transactions: records and reads
src/telegram-webhook.ts - Payment routes → ABA payments: creates payment
src/telegram-webhook.ts - KHQR payments → Bakong API: checks payment
src/khqr.ts - ABA payments → ABA PayWay: requests payment
src/aba.ts - Payment routes → Payment alerts: sends alerts
src/telegram-webhook.ts - Payment alerts → Telegram: sends message
src/telegram-bot.ts