Panel/modules/billing/includes
copilot-swe-agent[bot] 41a812fdd6
feat: add PayPal sandbox/live credentials, webhook endpoint, and admin diagnostics
- config.inc.php: new sandbox/live credential structure with paypal_mode, separate
  sandbox/live client_id, client_secret, webhook_id, and webhook_path
- config.example.php: updated to match new structure
- config_loader.php: adds defaults and backward compat mapping from old
  $paypal_sandbox/$paypal_client_id variables; adds gsp_paypal_* helper functions
- PayPalGateway.php: fromConfig() uses gsp_paypal_* helpers with fallback
- cart.php: uses gsp_paypal_get_client_id()/gsp_paypal_is_sandbox() helpers
- webhook.php: updated to use gsp_paypal_* helpers for credentials/API base
- paypal/webhook.php: new full-featured webhook receiver with signature
  verification, idempotency log, event processing, provisioning trigger
- admin_config.php: expanded to separate sandbox/live fields, computed webhook URL,
  diagnostics panel showing credential status and recent webhook events
- module.php: bumped to v3.3/db_version 3, adds billing_paypal_webhook_events table

Agent-Logs-Url: https://github.com/GameServerPanel/GSP/sessions/f974e469-8562-41df-ba37-bc340f5a154c

Co-authored-by: iaretechnician <2749183+iaretechnician@users.noreply.github.com>
2026-05-06 16:14:47 +00:00
..
admin_auth.php fix: harden billing module for standalone portability 2026-05-02 13:15:50 +00:00
cart_helper.php Apply automated PHP8 safety transforms 2026-04-23 14:01:37 +00:00
config.example.php feat: add PayPal sandbox/live credentials, webhook endpoint, and admin diagnostics 2026-05-06 16:14:47 +00:00
config.inc.php feat: add PayPal sandbox/live credentials, webhook endpoint, and admin diagnostics 2026-05-06 16:14:47 +00:00
config_loader.php feat: add PayPal sandbox/live credentials, webhook endpoint, and admin diagnostics 2026-05-06 16:14:47 +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: billing cleanup, PayPal guard, docs nav prefix, coupon dark theme, XML guide link 2026-05-06 15:24:27 +00: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.