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 / AuthorizeNetPromo.php

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

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