Panel/modules/billing
copilot-swe-agent[bot] 7fe56d207f Fix troubleshooting section anchor in generated docs
Move start script, service setup, and troubleshooting sections outside the conditional block to ensure they appear in all generated documentation regardless of whether detailed XML startup params exist.

Co-authored-by: iaretechnician <2749183+iaretechnician@users.noreply.github.com>
2025-11-22 22:38:03 +00:00
..
_archived site changes by codex 2025-11-20 08:10:31 -05:00
api site changes by codex 2025-11-20 08:10:31 -05:00
css document fixes 2025-11-10 20:12:52 -05:00
data Add billing data logs to gitignore 2025-11-10 03:17:50 +00:00
docs Fix troubleshooting section anchor in generated docs 2025-11-22 22:38:03 +00:00
images Website is completed working, moved into billing module 2025-10-23 18:19:06 -04:00
includes site changes by codex 2025-11-20 08:10:31 -05:00
logs Website is completed working, moved into billing module 2025-10-23 18:19:06 -04:00
tools Website is completed working, moved into billing module 2025-10-23 18:19:06 -04:00
add_paypal_data_column.sql Update table prefix from ogp_ to gsp_ in SQL files and config 2025-11-07 10:48:01 +00:00
add_service_id_column.sql Update table prefix from ogp_ to gsp_ in SQL files and config 2025-11-07 10:48:01 +00:00
add_to_cart.php Merge branch 'Panel-unstable' of https://github.com/GameServerPanel/GSP into Panel-unstable 2025-11-10 07:23:04 -05:00
admin.php site changes by codex 2025-11-20 08:10:31 -05:00
admin_config.php Website is completed working, moved into billing module 2025-10-23 18:19:06 -04:00
admin_coupons.php Fix cart.php syntax error and add PHPDoc hints for VS Code 2025-11-10 03:10:42 +00:00
admin_invoices.php Fix tableprefix and cart mysql 2025-11-10 07:23:01 -05:00
admin_orders.php added billing integration on panel 2025-11-15 11:04:48 -05:00
admin_payments.php Website is completed working, moved into billing module 2025-10-23 18:19:06 -04:00
adminserverlist.php site changes by codex 2025-11-20 08:10:31 -05:00
ai.php Website is completed working, moved into billing module 2025-10-23 18:19:06 -04:00
BILLING_FIX_SUMMARY.md Add comprehensive BILLING_FIX_SUMMARY documentation 2025-10-29 01:46:57 +00:00
bootstrap.php site changes by codex 2025-11-20 08:10:31 -05:00
cart.php site changes by codex 2025-11-20 08:10:31 -05:00
check_table.php Fix tableprefix and cart mysql 2025-11-10 07:23:01 -05:00
cleanupDB.sh No changes 2025-09-11 13:29:15 -04:00
COLUMN_RENAME_SUMMARY.md added invoiceing 2025-10-28 05:22:01 -04:00
COUPON_SYSTEM.md Add comprehensive documentation for coupon system and standalone billing 2025-10-29 11:05:26 +00:00
create_coupons_table.sql Update table prefix from ogp_ to gsp_ in SQL files and config 2025-11-07 10:48:01 +00:00
create_invoices_table.sql Update table prefix from ogp_ to gsp_ in SQL files and config 2025-11-07 10:48:01 +00:00
create_servers.php site changes by codex 2025-11-20 08:10:31 -05:00
cron-shop.php Fix server end_date display with color coding and improve cron-shop automation 2025-10-29 03:25:58 +00:00
diag_remote.php site changes by codex 2025-11-20 08:10:31 -05:00
docs.php site changes by codex 2025-11-20 08:10:31 -05:00
fix_invoices_table_columns.sql Update table prefix from ogp_ to gsp_ in SQL files and config 2025-11-07 10:48:01 +00:00
FIXES_APPLIED.md site changes by codex 2025-11-20 08:10:31 -05:00
forgot_password.php site changes by codex 2025-11-20 08:10:31 -05:00
GAME_DOCS_TODO_REFERENCE.md document fixes 2025-11-10 20:12:52 -05:00
index.php Website is completed working, moved into billing module 2025-10-23 18:19:06 -04:00
INVOICE_FIRST_FLOW.md added invoiceing 2025-10-28 05:22:01 -04:00
INVOICE_SYSTEM.md added invoiceing 2025-10-28 05:22:01 -04:00
invoices.php Website is completed working, moved into billing module 2025-10-23 18:19:06 -04:00
logfile.txt Website is completed working, moved into billing module 2025-10-23 18:19:06 -04:00
LOGGING_CHANGES_SUMMARY.md Add summary documentation for logging changes 2025-10-29 21:42:26 +00:00
login.php site changes by codex 2025-11-20 08:10:31 -05:00
logout.php site changes by codex 2025-11-20 08:10:31 -05:00
MIGRATION_SUMMARY.md added invoiceing 2025-10-28 05:22:01 -04:00
migration_to_invoices.sql Update table prefix from ogp_ to gsp_ in SQL files and config 2025-11-07 10:48:01 +00:00
module.php site changes by codex 2025-11-20 08:10:31 -05:00
my_account.php site changes by codex 2025-11-20 08:10:31 -05:00
my_orders_panel.php added billing integration on panel 2025-11-15 11:04:48 -05:00
my_servers.php Merge branch 'Panel-unstable' of https://github.com/GameServerPanel/GSP into Panel-unstable 2025-11-10 07:23:04 -05:00
navigation.xml added billing integration on panel 2025-11-15 11:04:48 -05:00
order.php Merge branch 'Panel-unstable' of https://github.com/GameServerPanel/GSP into Panel-unstable 2025-11-10 07:23:04 -05:00
PANEL_INTEGRATION.md added billing integration on panel 2025-11-15 11:04:48 -05:00
payment_cancel.php added invoiceing 2025-10-28 05:22:01 -04:00
PAYMENT_IMPLEMENTATION_SUMMARY.md copilot and cart updates 2025-11-05 11:55:31 -05:00
payment_success.php Add PHPDoc hints to additional billing module files for IDE support 2025-11-10 03:15:15 +00:00
PAYPAL_DEBUGGING_GUIDE.md Add comprehensive debugging documentation for PayPal payment flow 2025-10-29 21:40:01 +00:00
PHASE1_COMPLETE_SUMMARY.md document fixes 2025-11-10 20:12:52 -05:00
privacy.php style fixes 2025-10-23 19:44:24 -04:00
QUICK_DEBUG_REFERENCE.md Add comprehensive debugging documentation for PayPal payment flow 2025-10-29 21:40:01 +00:00
QUICK_START.md added billing integration on panel 2025-11-15 11:04:48 -05:00
README.md site changes by codex 2025-11-20 08:10:31 -05:00
README_COUPON_UPDATE.md Add comprehensive documentation for coupon system and standalone billing 2025-10-29 11:05:26 +00:00
RECENT_FIXES_SUMMARY.md site changes by codex 2025-11-20 08:10:31 -05:00
register.php site changes by codex 2025-11-20 08:10:31 -05:00
renew_server.php site changes by codex 2025-11-20 08:10:31 -05:00
reset_password.php site changes by codex 2025-11-20 08:10:31 -05:00
return.php Website is completed working, moved into billing module 2025-10-23 18:19:06 -04:00
server_status.php Fix tableprefix and cart mysql 2025-11-10 07:23:01 -05:00
serverlist.php Merge branch 'Panel-unstable' of https://github.com/GameServerPanel/GSP into Panel-unstable 2025-11-10 07:23:04 -05:00
STATUS_REPORT.md Add comprehensive status report for billing module updates 2025-11-07 10:54:39 +00:00
test_db_connection.php site changes by codex 2025-11-20 08:10:31 -05:00
test_integration.php added billing integration on panel 2025-11-15 11:04:48 -05:00
TESTING_CHECKLIST.md Add comprehensive TESTING_CHECKLIST for billing fixes 2025-10-29 01:49:30 +00:00
timestamp.txt updated timestamps 2025-11-10 12:16:04 -05:00
tos.php Changes to be committed: 2025-10-23 19:25:29 -04:00
update_metadata_complete.ps1 document fixes 2025-11-10 20:12:52 -05:00
webhook.php Refactor process_payment_record into reusable payment_processor.php helper 2025-10-29 01:42:24 +00:00

GameServers.World - Billing Module

Overview

The billing module is a complete standalone website for selling game servers. It can be deployed on the same machine as the GSP panel or on a completely separate external web host.

Documentation System

Visual TODO System

As of December 19, 2024, all game documentation includes completion tracking:

  • Complete Documentation: Displays with normal name (e.g., "Minecraft Server")
  • Incomplete Documentation: Displays with "TODO: " prefix (e.g., "TODO: Arma 3")

Current Status

  • Complete: 1 game (Minecraft - comprehensive template)
  • Incomplete: 146 games (marked with TODO prefix)

Documentation Template Standard

All complete documentation should match the Minecraft template:

  • Comprehensive ports table (ALL ports with purposes)
  • Firewall configurations (UFW, FirewallD, Windows, iptables)
  • Startup parameters with detailed explanations
  • Troubleshooting sections with specific solutions
  • Performance optimization tips
  • Security best practices
  • Resource links with citations

Viewing Documentation

  • Browse to docs.php to see all game documentation
  • Games with "TODO: " prefix need comprehensive research and writing
  • Click any game to view its documentation page

Marking Documentation Complete

When game documentation is finished:

  1. Edit docs/{game}/metadata.json
  2. Change "complete": false to "complete": true
  3. The TODO prefix will automatically disappear

Recent Updates

December 19, 2024 - Visual TODO System

  • Implemented completion tracking for all 148 game folders
  • Created PowerShell automation script (update_metadata_complete.ps1)
  • Updated docs.php with automatic TODO prefix display
  • Minecraft documentation completed as template example

November 10, 2025 - Critical Fixes

  • Fixed PayPal payment capture session issue
  • Removed cart debug logging code
  • Fixed cart page header/footer consistency
  • Implemented AJAX invoice removal with Font Awesome icons

Key Files

Documentation System

  • docs.php - Documentation browser with TODO system
  • docs/*/index.php - Individual game documentation pages
  • docs/*/metadata.json - Game metadata with completion status
  • update_metadata_complete.ps1 - Batch metadata update script

Reference Documents

  • PHASE1_COMPLETE_SUMMARY.md - Phase 1 implementation summary
  • GAME_DOCS_TODO_REFERENCE.md - Complete reference for documentation system
  • RECENT_FIXES_SUMMARY.md - All recent fixes and enhancements

Payment Integration

  • api/capture_order.php - PayPal payment capture (fixed session handling)
  • payment_success.php - Payment success redirect
  • payment_cancel.php - Payment cancellation handler

Shopping Cart

  • cart.php - Shopping cart UI with PayPal integration (cleaned up)
  • add_to_cart.php - Add items to cart
  • remove_from_cart.php - AJAX removal endpoint

Development Guidelines

Adding New Game Documentation

  1. Create folder: docs/{game-slug}/
  2. Create metadata.json:
    {
      "name": "Game Name",
      "description": "Brief description",
      "category": "game",
      "order": 100,
      "complete": false
    }
    
  3. Create index.php following Minecraft template
  4. Add optional icon.png or icon.jpg
  5. When complete, set "complete": true in metadata

Research Sources for Game Documentation

  • Official game wikis and documentation
  • LGSM (LinuxGSM) scripts and configuration files
  • Steam Community Guides (highly-rated)
  • Reddit communities (r/gameservers, game-specific)
  • GitHub repositories with server configurations
  • Official game forums
  • User-contributed solutions and fixes

Documentation Quality Standards

  • Comprehensive Ports: List ALL ports with purposes (TCP/UDP)
  • Startup Parameters: Full parameter explanations with examples
  • Troubleshooting: Specific common issues with tested solutions
  • Firewall Configs: Multiple platform examples (Linux + Windows)
  • Citations: Link to all sources used in research
  • Testing: Verify all commands and configurations are accurate

Next Priorities

Phase 2: ARMA Family + DayZ (HIGH PRIORITY)

  1. Arma 3
  2. Arma 2: Operation Arrowhead
  3. Arma 2: Combined Operations
  4. DayZ Standalone
  5. DayZ Mod
  • Counter-Strike family (1.6, Source, CS2, CS:GO)
  • Survival/Building (Rust, Terraria, Valheim, ARK)
  • Co-op Shooters (L4D series, Killing Floor series, TF2)
  • Tactical Shooters (Insurgency series, Squad)

Phase 4: Remaining Games

  • All other 50+ game folders in alphabetical order

Testing Checklist

PayPal Integration

  • User can add servers to cart
  • PayPal checkout button works
  • Payment completes successfully
  • Success page displays correctly
  • No NO_USER_SESSION errors in logs

Documentation System

  • docs.php displays all games correctly
  • TODO prefix shows for incomplete docs
  • Complete docs show without TODO prefix
  • Individual game pages load correctly
  • Navigation links work within documentation

Cart Functionality

  • Cart displays all items correctly
  • Remove button deletes items (AJAX)
  • Header and footer display consistently
  • Fonts match other billing pages

Technical Notes

Session Management

  • CRITICAL: Always use session_name("opengamepanel_web") before session_start()
  • Sessions are separate from panel sessions
  • User authentication stored in $_SESSION['website_user_id']

Database Connection

  • Uses mysqli with credentials from includes/config.inc.php
  • All database operations use native mysqli functions
  • Never use panel-specific functions

Standalone Design

  • Module must work on external hosting
  • No dependencies on panel files
  • All paths use __DIR__ relative references
  • MySQL connection direct (not through panel)

Support & Resources

  • Main project: GameServerPanel/GSP
  • Branch: Panel-unstable
  • Documentation: Browse docs.php for game-specific guides
  • Issues: Check logs in modules/billing/logs/

Last Updated: December 19, 2024
Version: 2.0 (with Visual TODO System)