You are here

public function PaymentDeleteForm::submitForm in Ubercart 8.4

Form submission handler.

Parameters

array $form: An associative array containing the structure of the form.

\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.

Overrides FormInterface::submitForm

File

payment/uc_payment/src/Form/PaymentDeleteForm.php, line 69

Class

PaymentDeleteForm
Confirmation form to delete a payment from an order.

Namespace

Drupal\uc_payment\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $this->payment
    ->delete();
  $this
    ->messenger()
    ->addMessage($this
    ->t('Payment deleted.'));
  $form_state
    ->setRedirectUrl($this
    ->getCancelUrl());
}