# fluent-cart/1.3.23/app/Modules/PaymentMethods/SquareGateway/SquareSettingsBase.php

FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler, version 1.3.23. 65 lines.

- Page: https://pluginprobe.com/plugins/fluent-cart/1.3.23/code/app/Modules/PaymentMethods/SquareGateway/SquareSettingsBase.php
- Raw: https://pluginprobe.com/plugins/fluent-cart/1.3.23/raw/app/Modules/PaymentMethods/SquareGateway/SquareSettingsBase.php
- Modified: 2025-10-14T16:36:46+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/fluent-cart/1.3.23/code/app/Modules/PaymentMethods/SquareGateway/SquareSettingsBase.php#L10-L20`.

```php
<?php

namespace FluentCart\App\Modules\PaymentMethods\SquareGateway;

use FluentCart\App\Modules\PaymentMethods\Core\BaseGatewaySettings;
use FluentCart\App\Helpers\Helper;
use FluentCart\Framework\Support\Arr;

class SquareSettingsBase extends BaseGatewaySettings
{
    public $settings;
    public $methodHandler = 'fluent_cart_payment_settings_square';


    public static function getDefaults()
    {
        return [
            'is_active' => 'no',
            'application_id' => '',
            'access_token' => '',
            'location_id' => '',
            'webhook_signature_key' => '',
            'payment_mode' => 'sandbox',
        ];
    }

    public function isActive(): bool
    {
        return $this->settings['is_active'] == 'yes';
    }

    public function get($key = '')
    {
        if ($key && isset($this->settings[$key])) {
            return $this->settings[$key];
        }
        return $this->settings;
    }

    public function getMode()
    {
        return $this->get('payment_mode');
    }

    public function getApplicationId()
    {
        return $this->get('application_id');
    }

    public function getAccessToken()
    {
        return Helper::decryptKey($this->get('access_token'));
    }

    public function getLocationId()
    {
        return $this->get('location_id');
    }

    public function getWebhookSignatureKey()
    {
        return Helper::decryptKey($this->get('webhook_signature_key'));
    }
}

```
