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.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 trunk All 48 releases
fluent-cart / app / Modules / PaymentMethods / PromoGateways / Pro / PaddlePromo.php

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

90 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\Modules\PaymentMethods\Core\AbstractPaymentGateway;
6 use FluentCart\App\Services\Payments\PaymentInstance;
7 use FluentCart\App\Vite;
8
9 class PaddlePromo extends AbstractPaymentGateway
10 {
11 public array $supportedFeatures = [];
12
13 public function __construct()
14 {
15 $settings = new PromoGatewaySettings('paddle');
16 parent::__construct($settings);
17 }
18
19 public function meta(): array
20 {
21 return [
22 'title' => 'Paddle',
23 'route' => 'paddle',
24 'slug' => 'paddle',
25 'description' => 'Accept credit cards and PayPal payments securely with Paddle. Available in FluentCart Pro.',
26 'logo' => Vite::getAssetUrl("images/payment-methods/paddle-logo.svg"),
27 'icon' => Vite::getAssetUrl("images/payment-methods/paddle-logo.svg"),
28 'brand_color' => '#7c3aed',
29 'status' => false,
30 'requires_pro' => true,
31 'supported_features' => $this->supportedFeatures
32 ];
33 }
34
35 public function makePaymentFromPaymentInstance(PaymentInstance $paymentInstance)
36 {
37 // This will not be called since the gateway is not active
38 return null;
39 }
40
41 public function handleIPN()
42 {
43 // This will not be called since the gateway is not active
44 }
45
46 public function getOrderInfo(array $data)
47 {
48 // This will not be called since the gateway is not active
49 return null;
50 }
51
52 /**
53 * Get Paddle-specific notice configuration
54 */
55 private function getNoticeConfig()
56 {
57 return [
58 'title' => __('Paddle Payment Gateway', 'fluent-cart'),
59 'description' => __('Accept credit cards and PayPal securely with Paddle. Complete checkout solution with built-in tax handling, invoicing, and subscription management.', 'fluent-cart'),
60 'features' => [
61 __('Credit Card & PayPal payments', 'fluent-cart'),
62 __('Recurring billing & subscriptions', 'fluent-cart'),
63 __('Built-in tax & VAT handling', 'fluent-cart'),
64 __('Automatic invoicing & refunds', 'fluent-cart')
65 ],
66 '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',
67 'upgrade_url' => 'https://fluentcart.com/pricing/'
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' => __('Paddle Payment Gateway', 'fluent-cart'),
85 'type' => 'html_attr'
86 ],
87 ];
88 }
89 }
90