Panel/modules/billing/includes
copilot-swe-agent[bot] 986a4e53b4
refactor(billing): clean architecture with payment gateway abstraction
- Add PaymentGatewayInterface contract for all payment providers
- Add PayPalGateway (reads credentials from config, not hardcoded)
- Add ManualGateway for admin-triggered payments
- Add StripeGateway stub for future implementation
- Add GatewayFactory for gateway instantiation by name
- Add BillingRepository: parameterized-SQL data layer
- Add BillingService: pricing, invoice creation, payment processing
- Add gsp_billing_transactions table (DB version 2) for audit trail
- Add new columns to gsp_billing_invoices (home_id, rate_type, players, period_start/end, subtotal, total_due, payment_status)
- Add gsp_billing_service_remote_servers mapping table
- Move PayPal credentials from api files into config.inc.php
- Fix double session_start() bug in capture_order.php
- Replace raw SQL with prepared statements throughout
- Refactor admin_invoices.php to use billing_invoices + BillingRepository
- Refactor admin_payments.php to read from gsp_billing_transactions
- Update admin.php with links to Transaction Log and Manage Invoices

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Co-authored-by: iaretechnician <2749183+iaretechnician@users.noreply.github.com>
2026-05-02 12:17:36 +00:00
..
admin_auth.php fixed missign config file and added check if xmlrpc istnt installed 2025-11-23 14:42:37 -05:00
cart_helper.php Apply automated PHP8 safety transforms 2026-04-23 14:01:37 +00:00
config.inc.php refactor(billing): clean architecture with payment gateway abstraction 2026-05-02 12:17:36 +00:00
config.inc.php.orig Changes to be committed: 2025-10-23 19:25:29 -04:00
config_loader.php Apply automated PHP8 safety transforms 2026-04-23 14:01:37 +00:00
footer.php fixed cart.php formatting 2025-11-10 13:20:11 -05:00
log.php Website is completed working, moved into billing module 2025-10-23 18:19:06 -04:00
login_required.php site changes by codex 2025-11-20 08:10:31 -05:00
menu.php fix menu 2025-12-06 07:15:45 -05:00
panel_bridge.php feat: add GSP customized install.php with port support, auto-admin, and ogp_ migration 2026-04-27 19:57:03 +00:00
payment_processor.php feat: simplify billing status to Active/Invoiced/Expired with new SQL migration and cron rewrite 2026-05-01 22:17:22 +00:00
README.md Website is completed working, moved into billing module 2025-10-23 18:19:06 -04:00
session_bridge.php site changes by codex 2025-11-20 08:10:31 -05:00
top.php Website is completed working, moved into billing module 2025-10-23 18:19:06 -04:00

Website Includes Directory

This directory contains configuration and shared files for the standalone _website folder.

config.inc.php

Central database configuration file for the website. This file contains the database connection settings that are used by all website PHP files through the db.php file.

Important: The values in this file should match the panel's database configuration in /includes/config.inc.php to ensure the website can access the same database as the panel.

Configuration Variables

  • $db_host - Database server hostname
  • $db_user - Database username
  • $db_pass - Database password
  • $db_name - Database name
  • $table_prefix - Table prefix (default: "ogp_")
  • $db_type - Database type (default: "mysql")

Usage

The website files include db.php, which in turn loads this configuration file:

require_once('db.php');  // db.php loads includes/config.inc.php

This centralizes database credentials in one place, making the website easier to configure and maintain as a standalone site.