$clientId, 'secret' => $secret, 'webhook_id' => (string) ($c['webhook_id'] ?? ''), ]; } public static function apiBase(): string { return self::mode() === 'live' ? 'https://api-m.paypal.com' : 'https://api-m.sandbox.paypal.com'; } public static function webhookId(): string { $cfg = self::load(); $mode = self::mode(); return (string) ($cfg[$mode]['webhook_id'] ?? ''); } /** @return mixed */ public static function get(string $key, $default = null) { $cfg = self::load(); return $cfg[$key] ?? $default; } }