public function OrderPaymentsForm::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/ OrderPaymentsForm.php, line 202
Class
- OrderPaymentsForm
- Displays a list of payments attached to an order.
Namespace
Drupal\uc_payment\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$payment = $form_state
->getValues();
uc_payment_enter($this->order
->id(), $payment['method'], $payment['amount'], $this
->currentUser()
->id(), NULL, $payment['comment'], $payment['received']
->getTimestamp());
$this
->messenger()
->addMessage($this
->t('Payment entered.'));
}