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 / Cod / CodSettingsBase.php

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

52 lines 1.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\Cod;
4 use FluentCart\Api\StoreSettings;
5 use FluentCart\App\Modules\PaymentMethods\Core\BaseGatewaySettings;
6
7 class CodSettingsBase extends BaseGatewaySettings
8 {
9
10 public $settings;
11 public $methodHandler = 'fluent_cart_payment_settings_offline_payment';
12
13
14 public static function getDefaults(): array
15 {
16 return [
17 'is_active' => 'no',
18 'payment_mode' => 'live',
19 ];
20 }
21
22 public function isActive(): bool
23 {
24 return $this->settings['active'] == 'yes';
25 }
26
27 public function getMode()
28 {
29 return (new StoreSettings)->get('order_mode');
30 }
31
32 public function getPublicKey()
33 {
34 // TODO: Implement getPublicKey() method.
35 }
36
37 public function getApiKey()
38 {
39 // TODO: Implement getApiKey() method.
40 }
41
42 public function get($key = '')
43 {
44 $settings = $this->settings;
45
46 if ($key && isset($this->settings[$key])) {
47 return $this->settings[$key];
48 }
49 return $settings;
50 }
51 }
52