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.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 / AirwallexGateway / AirwallexSettingsBase.php

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

59 lines 1.3 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\AirwallexGateway;
4
5 use FluentCart\App\Modules\PaymentMethods\Core\BaseGatewaySettings;
6 use FluentCart\App\Helpers\Helper;
7 use FluentCart\Framework\Support\Arr;
8
9 class AirwallexSettingsBase extends BaseGatewaySettings
10 {
11 public $settings;
12 public $methodHandler = 'fluent_cart_payment_settings_airwallex';
13
14 public static function getDefaults()
15 {
16 return [
17 'is_active' => 'no',
18 'test_client_id' => '',
19 'live_client_id' => '',
20 'test_api_key' => '',
21 'live_api_key' => '',
22 'payment_mode' => 'test',
23 ];
24 }
25
26 public function isActive(): bool
27 {
28 return $this->settings['is_active'] == 'yes';
29 }
30
31 public function get($key = '')
32 {
33 if ($key && isset($this->settings[$key])) {
34 return $this->settings[$key];
35 }
36 return $this->settings;
37 }
38
39 public function getMode()
40 {
41 return $this->get('payment_mode');
42 }
43
44 public function getClientId()
45 {
46 return $this->get('client_id');
47 }
48
49 public function getApiKey()
50 {
51 return Helper::decryptKey($this->get('api_key'));
52 }
53
54 public function getWebhookSecret()
55 {
56 return Helper::decryptKey($this->get('webhook_secret'));
57 }
58 }
59