public function PayPalBasic::processBuildConfigurationForm in PayPal for Payment 2.0.x
Same name and namespace in other branches
- 8 src/Plugin/Payment/MethodConfiguration/PayPalBasic.php \Drupal\paypal_payment\Plugin\Payment\MethodConfiguration\PayPalBasic::processBuildConfigurationForm()
2 calls to PayPalBasic::processBuildConfigurationForm()
- PayPalExpress::processBuildConfigurationForm in src/
Plugin/ Payment/ MethodConfiguration/ PayPalExpress.php - PayPalStandard::processBuildConfigurationForm in src/
Plugin/ Payment/ MethodConfiguration/ PayPalStandard.php
2 methods override PayPalBasic::processBuildConfigurationForm()
- PayPalExpress::processBuildConfigurationForm in src/
Plugin/ Payment/ MethodConfiguration/ PayPalExpress.php - PayPalStandard::processBuildConfigurationForm in src/
Plugin/ Payment/ MethodConfiguration/ PayPalStandard.php
File
- src/
Plugin/ Payment/ MethodConfiguration/ PayPalBasic.php, line 47
Class
- PayPalBasic
- Abstract class for PayPal payment method configurations.
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'] = [
'#type' => 'container',
];
$element['paypal']['production'] = [
'#type' => 'checkbox',
'#title' => $this
->t('Production Server'),
'#default_value' => $this
->isProduction(),
];
$element['paypal']['logging'] = [
'#type' => 'fieldset',
'#title' => $this
->t('Logging'),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
];
$element['paypal']['logging']['loglevel'] = [
'#type' => 'select',
'#title' => $this
->t('Log Level'),
'#options' => [
'DEBUG' => $this
->t('Debugging'),
],
'#default_value' => $this
->getLogLevel(),
];
$element['paypal']['logging'][PayPalBasicMethod::PAYPAL_CONTEXT_TYPE_ADMIN] = [
'#type' => 'checkbox',
'#title' => $this
->t('Logging admin tasks'),
'#default_value' => $this
->isLogging(PayPalBasicMethod::PAYPAL_CONTEXT_TYPE_ADMIN),
];
$element['paypal']['logging'][PayPalBasicMethod::PAYPAL_CONTEXT_TYPE_CREATE] = [
'#type' => 'checkbox',
'#title' => $this
->t('Logging when creating payment'),
'#default_value' => $this
->isLogging(PayPalBasicMethod::PAYPAL_CONTEXT_TYPE_CREATE),
];
$element['paypal']['logging'][PayPalBasicMethod::PAYPAL_CONTEXT_TYPE_WEBHOOK] = [
'#type' => 'checkbox',
'#title' => $this
->t('Logging the webhooks'),
'#default_value' => $this
->isLogging(PayPalBasicMethod::PAYPAL_CONTEXT_TYPE_WEBHOOK),
];
$element['paypal']['logging'][PayPalBasicMethod::PAYPAL_CONTEXT_TYPE_REDIRECT] = [
'#type' => 'checkbox',
'#title' => $this
->t('Logging the redirects back from PayPal'),
'#default_value' => $this
->isLogging(PayPalBasicMethod::PAYPAL_CONTEXT_TYPE_REDIRECT),
];
return $element;
}