You are here

public function PaymentGatewayBase::defaultConfiguration in Commerce Core 8.2

Gets default configuration for this plugin.

Return value

array An associative array with the default configuration.

Overrides ConfigurableInterface::defaultConfiguration

4 calls to PaymentGatewayBase::defaultConfiguration()
Manual::defaultConfiguration in modules/payment/src/Plugin/Commerce/PaymentGateway/Manual.php
Gets default configuration for this plugin.
OffsiteRedirect::defaultConfiguration in modules/payment_example/src/Plugin/Commerce/PaymentGateway/OffsiteRedirect.php
Gets default configuration for this plugin.
Onsite::defaultConfiguration in modules/payment_example/src/Plugin/Commerce/PaymentGateway/Onsite.php
Gets default configuration for this plugin.
PaymentGatewayBase::setConfiguration in modules/payment/src/Plugin/Commerce/PaymentGateway/PaymentGatewayBase.php
Sets the configuration for this plugin instance.
3 methods override PaymentGatewayBase::defaultConfiguration()
Manual::defaultConfiguration in modules/payment/src/Plugin/Commerce/PaymentGateway/Manual.php
Gets default configuration for this plugin.
OffsiteRedirect::defaultConfiguration in modules/payment_example/src/Plugin/Commerce/PaymentGateway/OffsiteRedirect.php
Gets default configuration for this plugin.
Onsite::defaultConfiguration in modules/payment_example/src/Plugin/Commerce/PaymentGateway/Onsite.php
Gets default configuration for this plugin.

File

modules/payment/src/Plugin/Commerce/PaymentGateway/PaymentGatewayBase.php, line 307

Class

PaymentGatewayBase
Provides the base class for payment gateways.

Namespace

Drupal\commerce_payment\Plugin\Commerce\PaymentGateway

Code

public function defaultConfiguration() {
  $modes = array_keys($this
    ->getSupportedModes());
  return [
    'display_label' => $this->pluginDefinition['display_label'],
    'mode' => $modes ? reset($modes) : '',
    'payment_method_types' => [],
    'collect_billing_information' => TRUE,
  ];
}