You are here

public function PayPalExpress::processBuildConfigurationForm in PayPal for Payment 2.0.x

Same name and namespace in other branches
  1. 8 src/Plugin/Payment/MethodConfiguration/PayPalExpress.php \Drupal\paypal_payment\Plugin\Payment\MethodConfiguration\PayPalExpress::processBuildConfigurationForm()

Overrides PayPalBasic::processBuildConfigurationForm

File

src/Plugin/Payment/MethodConfiguration/PayPalExpress.php, line 56

Class

PayPalExpress
Provides the configuration for the PayPal Express payment method plugin.

Namespace

Drupal\paypal_payment\Plugin\Payment\MethodConfiguration

Code

public function processBuildConfigurationForm(array &$element, FormStateInterface $form_state, array &$form) {
  parent::processBuildConfigurationForm($element, $form_state, $form);
  $element['paypal']['clientId'] = [
    '#type' => 'textfield',
    '#title' => $this
      ->t('Client ID'),
    '#default_value' => $this
      ->getClientId(),
    '#maxlength' => 255,
    '#required' => TRUE,
  ];
  $element['paypal']['clientSecret'] = [
    '#type' => 'textfield',
    '#title' => $this
      ->t('Client Secret'),
    '#default_value' => $this
      ->getClientSecret(),
    '#maxlength' => 255,
    '#required' => TRUE,
  ];
  return $element;
}