public function PaymentGatewayForm::submitInlineForm in Commerce Core 8.2
Submits the inline form.
Parameters
array $inline_form: The inline form, containing the following basic properties:
- #parents: Identifies the location of the field values in $form_state.
\Drupal\Core\Form\FormStateInterface $form_state: The form state of the complete form.
Overrides InlineFormBase::submitInlineForm
File
- modules/
payment/ src/ Plugin/ Commerce/ InlineForm/ PaymentGatewayForm.php, line 165
Class
- PaymentGatewayForm
- Provides a form element for embedding payment gateway forms.
Namespace
Drupal\commerce_payment\Plugin\Commerce\InlineFormCode
public function submitInlineForm(array &$inline_form, FormStateInterface $form_state) {
parent::submitInlineForm($inline_form, $form_state);
try {
$this->pluginForm
->submitConfigurationForm($inline_form, $form_state);
$this->entity = $this->pluginForm
->getEntity();
} catch (PaymentGatewayException $e) {
$error_element = $this->pluginForm
->getErrorElement($inline_form, $form_state);
$form_state
->setError($error_element, $e
->getMessage());
}
}