<?php
declare(strict_types=1); class StoreSecrets { private static array $cache = []; public static function get(string $key, string $fallback = ''): string { if (isset(self::$cache[$key])) return self::$cache[$key]; $map = ['STRIPE_PK' => '/var/www/private/stripe.secret.php', 'WALLET_XMR' => '/var/www/private/wallets.secret.php', 'WALLET_USDT' => '/var/www/private/wallets.secret.php', 'WALLET_USDC' => '/var/www/private/wallets.secret.php', 'ET_EMAIL' => '/var/www/private/etransfer.secret.php']; $file = $map[$key] ?? ''; if (!$file || !file_exists($file)) return $fallback; $data = include $file; if (is_array($data) && isset($data[$key])) { self::$cache[$key] = (string)$data[$key]; return self::$cache[$key]; } return $fallback; } }
if (!defined('STORE_ROOT')) { http_response_code(403); exit; }
