PluginProbe
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler / 1.3.21
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler v1.3.21
1.6.6 1.6.5 1.6.4 1.6.3 1.6.2 1.6.1 1.6.0 1.5.4 1.5.5 1.5.3 1.5.2 1.5.1 1.5.0 1.4.2 1.4.1 1.4.0 1.3.28 1.3.27 1.3.26 1.3.25 1.3.23 1.3.22 1.3.21 1.3.20 1.3.19 All 49 releases
fluent-cart / app / Modules / PaymentMethods / PromoGateways / Pro / MolliePromo.php

MolliePromo.php in FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler 1.3.21, at app/Modules/PaymentMethods/PromoGateways/Pro/MolliePromo.php

90 lines 2.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace FluentCart\App\Modules\PaymentMethods\PromoGateways\Pro;
4
5 use FluentCart\App\Modules\PaymentMethods\Core\AbstractPaymentGateway;
6 use FluentCart\App\Services\Payments\PaymentInstance;
7 use FluentCart\App\Vite;
8
9 class MolliePromo extends AbstractPaymentGateway
10 {
11 public array $supportedFeatures = [];
12
13 public function __construct()
14 {
15 $settings = new PromoGatewaySettings('mollie');
16 parent::__construct($settings);
17 }
18
19 public function meta(): array
20 {
21 return [
22 'title' => 'Mollie',
23 'route' => 'mollie',
24 'slug' => 'mollie',
25 'description' => 'Pay securely with Mollie - Credit Card, PayPal, SEPA, and more.',
26 'logo' => Vite::getAssetUrl("images/payment-methods/mollie-logo.svg"),
27 'icon' => Vite::getAssetUrl("images/payment-methods/mollie-icon.svg"),
28 'brand_color' => '#7c3aed',
29 'status' => false,
30 'requires_pro' => true,
31 'upgrade_url' => '',
32 'supported_features' => $this->supportedFeatures
33 ];
34 }
35
36 public function makePaymentFromPaymentInstance(PaymentInstance $paymentInstance)
37 {
38 // This will not be called since the gateway is not active
39 return null;
40 }
41
42 public function handleIPN()
43 {
44 // This will not be called since the gateway is not active
45 }
46
47 public function getOrderInfo(array $data)
48 {
49 // This will not be called since the gateway is not active
50 return null;
51 }
52
53 /**
54 * Get Mollie-specific notice configuration
55 */
56 private function getNoticeConfig()
57 {
58 return [
59 'title' => __('Mollie Payment Gateway', 'fluent-cart'),
60 'description' => __('Accept payments through Mollie - Credit Card, PayPal, SEPA, iDEAL, Bancontact, and more. Popular in Europe with seamless checkout experience.', 'fluent-cart'),
61 'features' => [
62 __('Multiple payment methods in one gateway', 'fluent-cart'),
63 __('Recurring payments & subscriptions', 'fluent-cart'),
64 __('Automatic payment confirmation', 'fluent-cart'),
65 __('Refund management & webhooks', 'fluent-cart')
66 ],
67 'icon_path' => 'M12 2L15.09 8.26L22 9.27L17 14.14L18.18 21.02L12 17.77L5.82 21.02L7 14.14L2 9.27L8.91 8.26L12 2Z',
68 ];
69 }
70
71 /**
72 * Generate upgrade to pro message
73 */
74 public function upgradeToProMessage()
75 {
76 return $this->settings->generateUpgradeNotice($this->getNoticeConfig());
77 }
78
79 public function fields()
80 {
81 return [
82 'notice' => [
83 'value' => $this->upgradeToProMessage(),
84 'label' => __('Mollie Payment Gateway', 'fluent-cart'),
85 'type' => 'html_attr'
86 ],
87 ];
88 }
89 }
90