This is a submission for the GitHub Finish-Up-A-Thon Challenge
What I Built PayFusion AI is a full-stack intelligent payment aggregation system that supports multi-channel payment with one QR code using platforms like Alipay, WeChat, USDT, and PayPal. It integrates automatic transfers, fund distribution, QR code parsing, and AI-driven real-time payment monitoring. This project started out as a simple Flask QR code generator but gradually evolved into a complete payment automation platform. Key features include: Multi-channel payment with one QR code: Dynamically generates aggregated QR codes and intelligently routes users to the corresponding payment channels based on their scanning environment. AI fund monitoring Agent: Monitors payment status in real-time, automatically confirms fund arrival, and triggers subsequent workflows. Dual-platform architecture: Flask Web management backend + Telegram Bot mobile control. Automatic transfer engine: Supports automatic collection and fund distribution of USDT on the TRON network. Offline signature and blind signature: Complete blockchain security testing module. The entire project was developed and deployed entirely in a Termux Android terminal, eventually pushed to GitHub and automated using Railway/Render.
Demo GitHub repository: Bigboss6797976/ailipay
Telegram Bot: @PayFusionBot (demo environment) Web panel: https://ailipay-production.up.railway.app (demo environment) Screenshot preview: Web-side aggregated QR code generation interface Telegram Bot real-time payment notifications Fund diversion rule configuration panel Development environment in Termux
Turning point: Systematically "cleaning up the mess" I decided not to rewrite but to fix it—this is what Finish-Up-A-Thon is all about. First step: Environmental cleanup
Thoroughly clean up the corrupted lock files on Hardhat
rm -rf node_modules package-lock.json npm cache clean --force npm install
Step 2: Termux Compatibility Modifications Install Termux-specific compilation dependencies for Pillow: pkg install libjpeg-turbo libpng Replace psutil with native Python os and subprocess to rewrite the system monitoring module Downgrade TronWeb to v4 stable and refactor all address generation logic Install the zbar system library: pkg install zbar and set LD_LIBRARY_PATH
Step 3: Deploy Pipeline Fixes Fix Flask's RGBA color parsing errors by switching to hexadecimal color values Generate a one-click deployment script, railway_fix.sh, to automate CI/CD from Termux → GitHub → Railway Create a streamlined requirements file for Render, removing dependencies with compilation conflicts
Step 4: Architecture Upgrade Split the messy scripts into modular structures: bot.py (TG side), app.py (Web side), payment/ (core), crypto/ (on-chain) Introduce the aiogram 3.7+ asynchronous framework and rewrite all Telegram interaction logic Add environment variable management to completely decouple sensitive information from the code
Current Status Today, this project has become a production-ready system: ✅ Passed all unit tests with zero errors ✅ Stably running on Railway and Render ✅ Telegram Bot supports over 20 commands and 80+ feature modules ✅ Complete payment flow: scan code → payment → confirmation → automatic transfer → notification ✅ Codebase has evolved from "unrunnable" to "maintainable and scalable"
The Biggest Takeaway What this project taught me wasn’t just a specific technology stack, but how to deliver engineering solutions in resource-limited environments. When the development environment is just an Android phone, when the compiler throws its 50th error, when the documentation says "not supported on this platform"—choosing to keep debugging instead of giving up—that’s what "Finishing-Up" really means.
To you guys who are also developing on phones/tablets, if you're struggling with Termux, remember these tips: 1. Use $HOME as your build directory and copy it to shared storage to avoid permission issues. 2. If you run into compilation errors, check the system libraries first - pkg install usually works before pip install. 3. Lock down dependency versions since Termux isn't standard Linux, and the latest versions often mean incompatibility. 4. Write a one-click script to combine "push → deploy → check" into one command to reduce mental stress. Thanks to GitHub and DEV for organizing this challenge. Completing one project is more valuable than starting ten. If you're also cleaning up messes, keep going - the release date is just around the corner. If you're interested in this project, feel free to Star it or submit an Issue on GitHub!
Top comments (0)