# fluentform/6.2.8/app/Modules/Payments/PaymentMethods/BasePaymentMethod.php

Fluent Forms – Customizable Contact Forms, Survey, Quiz, &amp; Conversational Form Builder, version 6.2.8. 35 lines.

- Page: https://pluginprobe.com/plugins/fluentform/6.2.8/code/app/Modules/Payments/PaymentMethods/BasePaymentMethod.php
- Raw: https://pluginprobe.com/plugins/fluentform/6.2.8/raw/app/Modules/Payments/PaymentMethods/BasePaymentMethod.php
- Modified: 2025-03-19T15:44:40+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/fluentform/6.2.8/code/app/Modules/Payments/PaymentMethods/BasePaymentMethod.php#L10-L20`.

```php
<?php

namespace FluentForm\App\Modules\Payments\PaymentMethods;

if (!defined('ABSPATH')) {
    exit; // Exit if accessed directly.
}

abstract class BasePaymentMethod
{
    protected $key = '';

    protected $settingsKey = '';

    public function __construct($key)
    {
        $this->key = $key;
        $this->settingsKey = 'fluentform_payment_settings_'.$key;

        add_filter('fluentform/payment_methods_global_settings', function ($methods) {
            $fields = $this->getGlobalFields();
            if($fields) {
                $methods[$this->key] = $fields;
            }
            return $methods;
        });
        add_filter('fluentform/payment_settings_' . $this->key, array($this, 'getGlobalSettings'));
    }

    abstract public function getGlobalFields();

    abstract public function getGlobalSettings();

}

```
