PluginProbe
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler / 1.6.4
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler v1.6.4
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 trunk 1.2.0 All 47 releases
fluent-cart / app / Modules / PaymentMethods / PromoGateways / Pro / MolliePromo.php

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

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