PluginProbe
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler / 1.3.26
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler v1.3.26
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 / AuthorizeNetPromo.php

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

93 lines 3.0 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 AuthorizeNetPromo extends AbstractPaymentGateway
10 {
11 public array $supportedFeatures = [];
12
13 public function __construct()
14 {
15 $settings = new PromoGatewaySettings('authorize_dot_net');
16
17 // Optional: Set custom color gradient if needed
18 // $settings->setCustomStyles([
19 // 'primary_gradient' => 'linear-gradient(135deg, #0066cc 0%, #004999 100%)'
20 // ]);
21
22 parent::__construct($settings);
23 }
24
25 public function meta(): array
26 {
27 return [
28 'title' => 'Authorize.Net',
29 'route' => 'authorize_dot_net',
30 'slug' => 'authorize_dot_net',
31 'description' => 'Pay securely with Authorize.Net - Credit and Debit Cards',
32 'logo' => Vite::getAssetUrl("images/payment-methods/authorize_dot_net-logo.svg"),
33 'icon' => Vite::getAssetUrl("images/payment-methods/authorize_dot_net-logo.svg"),
34 'brand_color' => '#0066cc',
35 'status' => false,
36 'requires_pro' => true,
37 'supported_features' => $this->supportedFeatures
38 ];
39 }
40
41 public function makePaymentFromPaymentInstance(PaymentInstance $paymentInstance)
42 {
43 // This will not be called since the gateway is not active
44 return null;
45 }
46
47 public function handleIPN()
48 {
49 // This will not be called since the gateway is not active
50 }
51
52 public function getOrderInfo(array $data)
53 {
54 // This will not be called since the gateway is not active
55 return null;
56 }
57
58
59 private function getNoticeConfig()
60 {
61 return [
62 'title' => __('Authorize.Net Payment Gateway', 'fluent-cart'),
63 'description' => __('Accept credit card and eCheck payments securely with Authorize.Net. Features include on-site checkout, fraud detection, and recurring billing support.', 'fluent-cart'),
64 'features' => [
65 __('On-site checkout with AcceptUI', 'fluent-cart'),
66 __('Credit Card and eCheck payments', 'fluent-cart'),
67 __('Automatic payment confirmation', 'fluent-cart'),
68 __('Refund management & webhooks', 'fluent-cart')
69 ],
70 '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',
71 'upgrade_url' => 'https://fluentcart.com/pricing/'
72 ];
73 }
74
75
76 public function upgradeToProMessage()
77 {
78 return $this->settings->generateUpgradeNotice($this->getNoticeConfig());
79 }
80
81 public function fields()
82 {
83 return [
84 'notice' => [
85 'value' => $this->upgradeToProMessage(),
86 'label' => __('Authorize.Net Payment Gateway', 'fluent-cart'),
87 'type' => 'html_attr'
88 ],
89 ];
90 }
91 }
92
93