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

PaddlePromo.php in FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler 1.6.4, at app/Modules/PaymentMethods/PromoGateways/Pro/PaddlePromo.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 PaddlePromo extends AbstractPaymentGateway
11 {
12 public array $supportedFeatures = [];
13
14 public function __construct()
15 {
16 $settings = new PromoGatewaySettings('paddle');
17 parent::__construct($settings);
18 }
19
20 public function meta(): array
21 {
22 return [
23 'title' => 'Paddle',
24 'route' => 'paddle',
25 'slug' => 'paddle',
26 'description' => __('Accept credit cards and PayPal payments securely with Paddle. Available in FluentCart Pro.', 'fluent-cart'),
27 'logo' => Vite::getAssetUrl("images/payment-methods/paddle-logo.svg"),
28 'icon' => Vite::getAssetUrl("images/payment-methods/paddle-logo.svg"),
29 'brand_color' => '#7c3aed',
30 'status' => false,
31 'requires_pro' => true,
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 Paddle-specific notice configuration
55 */
56 private function getNoticeConfig()
57 {
58 return [
59 'title' => __('Paddle Payment Gateway', 'fluent-cart'),
60 'description' => __('Accept credit cards and PayPal securely with Paddle. Complete checkout solution with built-in tax handling, invoicing, and subscription management.', 'fluent-cart'),
61 'features' => [
62 __('Credit Card & PayPal payments', 'fluent-cart'),
63 __('Recurring billing & subscriptions', 'fluent-cart'),
64 __('Built-in tax & VAT handling', 'fluent-cart'),
65 __('Automatic invoicing & refunds', '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 'upgrade_url' => Helper::getUpgradeUrl('feature_lock_gateway_paddle')
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' => __('Paddle Payment Gateway', 'fluent-cart'),
86 'type' => 'html_attr'
87 ],
88 ];
89 }
90 }
91