isProduction() && config('shop.live_release') === true && self::driver() === 'stripe' && self::liveKey() && SalesTerms::missingPages() === []; } public static function enabled(): bool { if (app()->isProduction()) { return self::live(); } return in_array(self::driver(), ['test', 'stripe'], true); } /** Stripe-Kasse: im Test nur mit Testschlüsseln, in Produktion nur nach der Produktivfreigabe. */ public static function stripe(): bool { if (app()->isProduction()) { return self::live(); } return self::driver() === 'stripe'; } /** Kauf auf Rechnung für Organisationen (manuelle Rechnung, Zahlungseingang durch den Betreiber). */ public static function invoice(): bool { return self::enabled() && (bool) config('shop.invoice', true); } private static function liveKey(): bool { $secret = (string) config('services.stripe.secret'); return str_starts_with($secret, 'sk_live_') || str_starts_with($secret, 'rk_live_'); } }