public function PayPalExpress::processBuildConfigurationForm in PayPal for Payment 8
Same name and namespace in other branches
- 2.0.x src/Plugin/Payment/MethodConfiguration/PayPalExpress.php \Drupal\paypal_payment\Plugin\Payment\MethodConfiguration\PayPalExpress::processBuildConfigurationForm()
Implements a form API #process callback.
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\MethodConfigurationCode
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;
}