Panel/modules/billing/classes/StripeGateway.php
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

25 lines
734 B
PHP

<?php
require_once __DIR__ . '/../classes/PaymentGatewayInterface.php';
/**
* Stripe payment gateway stub.
* Implement this class when Stripe support is needed.
*/
class StripeGateway implements PaymentGatewayInterface
{
public function getName(): string { return 'stripe'; }
public function createPayment(array $params): array
{
return ['success' => false, 'error' => 'stripe_not_implemented'];
}
public function handleCallback(array $params): array
{
return ['success' => false, 'error' => 'stripe_not_implemented'];
}
public function verifyPayment(array $payload): bool { return false; }
public function getTransactionId(array $captureResult): ?string { return null; }
}