TRC20 PAY — PHP 8.4 standalone starter release
1. Create a new MySQL database and user in cPanel; grant all privileges on that database.
2. Upload/extract this folder. Set subdomain document root to its public directory (recommended). Keep private, cron and vendor outside public. Use HTTPS. If hosting cannot change document root, Apache rewrite and deny rules must be tested before use.
3. In Terminal cd to the extracted directory. Run composer install --no-dev using PHP 8.4. Composer and internet access are required; QR dependency is not bundled. Enable PDO MySQL, curl, GD, mbstring.
4. Create private/install-token.txt containing a random secret of at least 24 characters (openssl rand -hex 32). Visit https://YOUR-DOMAIN/install.php, enter token, DB credentials, TronGrid API key and admin account. Delete install.php after success. Never expose config.php.
5. Register a customer, sign in as admin, assign a NEW unused address generated in TronLink. Never enter seed phrases/private keys. Addresses are permanent. Do not deposit before assignment.
6. Run /opt/cpanel/ea-php84/root/usr/bin/php /ABSOLUTE/PATH/cron/scan.php (dry run). Test with a small confirmed USDT transfer. Review output. Then run with --settle and verify balance and duplicate prevention by running twice.
7. cPanel Cron Jobs: every minute (* * * * *) command /opt/cpanel/ea-php84/root/usr/bin/php /ABSOLUTE/PATH/cron/scan.php --settle . Configure cron email for failures. No public cron endpoint.
Scanner uses confirmed TronGrid TRC20 records, exact integer-derived decimal amounts, contract/recipient checks, pagination, overlap and atomic unique-TXID credit. Ambiguous multi-transfer transactions stop that customer's scan and require operator investigation. No automatic sweeping, withdrawals, merchant API, webhook, password reset or production-grade rate limiting included. Add hosting rate limiting and monitoring before public deployment. API indexing delays beyond overlap require manual reconciliation. No live chain or database integration test performed. QR dependency must be installed and tested. Back up database and reconcile against TRONSCAN regularly.
