You are here

public function CheckoutReviewForm::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

uc_cart/src/Form/CheckoutReviewForm.php, line 75

Class

CheckoutReviewForm
Gives customers the option to finish checkout or revise their information.

Namespace

Drupal\uc_cart\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $order = $form_state
    ->get('uc_order');
  $this->session
    ->remove('uc_checkout_review_' . $order
    ->id());
  $this->session
    ->set('uc_checkout_complete_' . $order
    ->id(), TRUE);
  $form_state
    ->setRedirect('uc_cart.checkout_complete');
}