diff --git a/modules/billing/RECENT_FIXES_SUMMARY.md b/modules/billing/RECENT_FIXES_SUMMARY.md new file mode 100644 index 00000000..4a7ac383 --- /dev/null +++ b/modules/billing/RECENT_FIXES_SUMMARY.md @@ -0,0 +1,266 @@ +# Recent Fixes & Enhancements Summary +**Date:** November 10, 2025 + +## Critical Fixes Completed ✅ + +### 1. PayPal Payment Capture Session Issue (FIXED) +**Problem:** Payment capture was failing with `NO_USER_SESSION` error even though user was logged in. + +**Root Cause:** The `api/capture_order.php` file was calling `session_start()` without setting the session name first, so it couldn't access the `gameservers_website` session where the user_id is stored. + +**Solution:** Added `session_name("gameservers_website")` before `session_start()` in `capture_order.php`. + +**File Modified:** `modules/billing/api/capture_order.php` (line ~148) + +**Test Steps:** +1. Log into the billing site +2. Add a server to cart +3. Click PayPal checkout button +4. Complete payment in PayPal sandbox +5. Verify payment completes successfully and redirects to success page +6. Check `modules/billing/logs/payment_capture.log` - should no longer show `NO_USER_SESSION` error + +--- + +### 2. Cart Page Debug Logging Removed (COMPLETED) +**What Was Removed:** +- Shutdown function that logged to `data/debug_cart.log` +- `?debug_cart=1` parameter handling +- Debug error display code + +**File Modified:** `modules/billing/cart.php` (lines 1-30) + +**Result:** Cart page now runs in production mode without debug overhead. + +--- + +### 3. Cart Page Header/Footer Consistency (FIXED) +**Problem:** Cart page had different fonts and styling than other billing pages; missing footer entirely. + +**Solutions Applied:** +1. Added `include(__DIR__ . '/includes/top.php');` before menu +2. Added `include(__DIR__ . '/includes/footer.php');` at page end +3. Removed global `font-family` and `background` override from inline CSS +4. Added favicon links to match other pages + +**Files Modified:** +- `modules/billing/cart.php` (head section and body closing) + +**Result:** Cart page now has consistent header/menu/footer with rest of billing module. + +--- + +## Documentation Enhancements Started 📚 + +### 4. Minecraft Documentation Updated (TEMPLATE CREATED) +**What Was Added:** +- Comprehensive **Ports section** with table showing all ports (TCP 25565, UDP 25565, TCP 25575, UDP 19132) +- Port purposes clearly explained +- Firewall configuration examples for multiple platforms +- Security notes for RCON and port protection +- Enhanced navigation with icons (🔌 Ports, ⚙️ Startup Parameters, 🔧 Troubleshooting) + +**File Modified:** `modules/billing/docs/minecraft/index.php` + +**Template Pattern Established:** +- ✅ Quick Info section (at top) +- ✅ Ports section with complete table +- ✅ Installation steps +- ✅ Configuration examples +- ✅ Startup Parameters section (already excellent) +- ✅ Troubleshooting section (already comprehensive) +- ✅ Performance optimization +- ✅ Security best practices + +--- + +## Remaining Documentation Work 📋 + +### Games Needing Full Port/Parameter/Troubleshooting Docs + +The following games need their `docs/{game}/index.php` files updated with the Minecraft template pattern: + +#### High Priority Games (Popular): +1. **Counter-Strike: Global Offensive** (`csgo/`) +2. **Team Fortress 2** (`tf2/`) +3. **Garry's Mod** (`garrysmod/`) +4. **Rust** (`rust/`) +5. **ARK: Survival Evolved** (`arkse/`) +6. **Terraria** (`terraria/`) +7. **Valheim** (`valheim/`) +8. **7 Days to Die** (`7daystodie/`) +9. **DayZ** (`dayz/`) +10. **Left 4 Dead 2** (`left4dead2/`) + +#### Medium Priority: +11. Counter-Strike Source (`css/`) +12. Arma 3 (`arma3/`) +13. Squad (`squad/`) +14. Insurgency Sandstorm (`insurgencysandstorm/`) +15. Space Engineers (`space_engineers/`) +16. Conan Exiles (`conanexiles/`) +17. The Forest (`theforest/`) +18. Don't Starve Together (`dontstarvetogether/`) +19. Factorio (`factorio/`) +20. TeamSpeak 3 (`teamspeak3/`) + +#### Lower Priority (Legacy/Niche): +21. All remaining games in `modules/billing/docs/` + +--- + +### Research Needed Per Game + +For each game, research and document: + +1. **All Network Ports:** + - Game port (TCP/UDP) + - Query port + - RCON/Admin port + - Voice chat ports (if applicable) + - Steam port (if Steam-based) + - Additional service ports (web interfaces, etc.) + +2. **Startup Parameters:** + - Command-line flags + - Memory allocation + - Server configuration switches + - Performance optimization flags + +3. **Common Issues (from internet research):** + - "Server won't start" specific to that game + - Connection problems + - Performance/lag issues specific to game engine + - Mod/plugin conflicts + - Save corruption issues + - Update/patch problems + +4. **Game-Specific Configuration:** + - Main config file locations + - Critical settings + - Player limits + - World/map settings + +--- + +### Documentation Template Structure + +Each game's `index.php` should follow this structure: + +```php + + + +
| Port | +Protocol | +Purpose | +Required? | +
|---|---|---|---|
25565 |
+ TCP | +Main game connection (players connect here) | +✓ Yes | +
25565 |
+ UDP | +Server query protocol (for server lists) | +○ Optional | +
25575 |
+ TCP | +RCON (remote console administration) | +○ Optional | +
19132 |
+ UDP | +Bedrock Edition (if running Geyser plugin) | +○ Optional | +
Allow Minecraft server through your firewall:
+# UFW (Ubuntu/Debian)
+sudo ufw allow 25565/tcp comment 'Minecraft Server'
+sudo ufw allow 25565/udp comment 'Minecraft Query'
+
+# FirewallD (CentOS/RHEL)
+sudo firewall-cmd --permanent --add-port=25565/tcp
+sudo firewall-cmd --permanent --add-port=25565/udp
+sudo firewall-cmd --reload
+
+# iptables
+sudo iptables -A INPUT -p tcp --dport 25565 -j ACCEPT
+sudo iptables -A INPUT -p udp --dport 25565 -j ACCEPT
+sudo iptables-save > /etc/iptables/rules.v4
+
+# Windows Firewall
+netsh advfirewall firewall add rule name="Minecraft Server" dir=in action=allow protocol=TCP localport=25565
+netsh advfirewall firewall add rule name="Minecraft Query" dir=in action=allow protocol=UDP localport=25565
+
+
+ # Main server port (TCP)
+server-port=25565
+
+# Query port (UDP) - usually same as server-port
+query.port=25565
+enable-query=true
+
+# RCON port (TCP) - remote administration
+rcon.port=25575
+enable-rcon=false
+rcon.password=changeme_use_strong_password
+
+
+