gatewaySlug = $gatewaySlug; $this->methodHandler = 'fluent_cart_payment_settings_promo_gateway'; parent::__construct(); } public static function getDefaults() { return [ 'is_active' => 'no' ]; } public function get($key = null) { if ($key === 'is_active') { return 'no'; } if ($key) { return isset($this->settings[$key]) ? $this->settings[$key] : null; } return $this->settings; } public function getMode() { return 'test'; } public function isActive(): bool { return false; } public function setCustomStyles($styles) { $this->customStyles = $styles; } protected function getPromoNoticeStyles() { $defaults = [ 'light' => [ 'primary_gradient' => 'linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%)', 'text_primary' => '#1e293b', 'text_secondary' => '#475569', 'text_muted' => '#64748b', 'icon_bg' => '#e0e7ff', 'icon_color' => '#6366f1', 'feature_icon' => '#10b981', 'button_bg' => '#6366f1', 'button_text' => '#ffffff', 'border_color' => '#e2e8f0', 'feature_bg' => '#ffffff' ], 'dark' => [ 'primary_gradient' => 'linear-gradient(135deg, #1e293b 0%, #0f172a 100%)', 'text_primary' => '#f1f5f9', 'text_secondary' => '#cbd5e1', 'text_muted' => '#94a3b8', 'icon_bg' => 'rgba(99, 102, 241, 0.15)', 'icon_color' => '#818cf8', 'feature_icon' => '#34d399', 'button_bg' => '#6366f1', 'button_text' => '#ffffff', 'border_color' => '#334155', 'feature_bg' => 'rgba(15, 23, 42, 0.5)' ] ]; if (!empty($this->customStyles)) { $defaults['light'] = array_merge($defaults['light'], $this->customStyles['light'] ?? []); $defaults['dark'] = array_merge($defaults['dark'], $this->customStyles['dark'] ?? []); } return $defaults; } /** * Render SVG icon */ protected function renderIcon($svgPath, $styles = '') { return ''; } /** * Render a feature list item with checkmark */ protected function renderFeatureItem($text, $mode = 'light') { $styles = $this->getPromoNoticeStyles()[$mode]; $checkIcon = $this->renderIcon( 'M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z', 'width: 18px; height: 18px; fill: ' . $styles['feature_icon'] . '; margin-right: 10px; flex-shrink: 0;' ); return '
' . esc_html($config['description']) . '
'; // Features if (!empty($config['features'])) { $html .= '' . esc_html($footerText) . '
'; $html .= '