public function RobokassaPayment::submitConfigurationForm in Commerce robokassa 8.2
Form submission handler.
Parameters
array $form: An associative array containing the structure of the plugin form as built by static::buildConfigurationForm().
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form. Calling code should pass on a subform state created through \Drupal\Core\Form\SubformState::createForSubform().
Overrides PaymentGatewayBase::submitConfigurationForm
File
- src/
Plugin/ Commerce/ PaymentGateway/ RobokassaPayment.php, line 197
Class
- RobokassaPayment
- Provides the Off-site Robokassa payment gateway.
Namespace
Drupal\commerce_robokassa\Plugin\Commerce\PaymentGatewayCode
public function submitConfigurationForm(array &$form, FormStateInterface $form_state) {
parent::submitConfigurationForm($form, $form_state);
if (!$form_state
->getErrors()) {
$values = $form_state
->getValue($form['#parents']);
$this->configuration['MrchLogin'] = $values['MrchLogin'];
if (!empty($values['pass1'])) {
$this->configuration['pass1'] = $values['pass1'];
}
if (!empty($values['pass2'])) {
$this->configuration['pass2'] = $values['pass2'];
}
$this->configuration['server_url_live'] = $values['server_url_live'];
$this->configuration['server_url_test'] = $values['server_url_test'];
$this->configuration['hash_type'] = $values['hash_type'];
$this->configuration['show_robokassa_fee_message'] = $values['show_robokassa_fee_message'];
$this->configuration['allowed_currencies'] = $values['allowed_currencies'];
$this->configuration['logging'] = $values['logging'];
}
}