public function CashOnDelivery::orderEditProcess in Ubercart 8.4
Called when an order is being submitted after being edited.
Parameters
\Drupal\uc_order\OrderInterface $order: The order that is being edited.
array $form: The form array.
\Drupal\Core\Form\FormStateInterface $form_state: The form state array.
Return value
array An array of changes to log against the order.
Overrides PaymentMethodPluginBase::orderEditProcess
File
- payment/
uc_payment_pack/ src/ Plugin/ Ubercart/ PaymentMethod/ CashOnDelivery.php, line 153
Class
- CashOnDelivery
- Defines the cash on delivery payment method.
Namespace
Drupal\uc_payment_pack\Plugin\Ubercart\PaymentMethodCode
public function orderEditProcess(OrderInterface $order, array $form, FormStateInterface $form_state) {
if ($this->configuration['delivery_date']) {
$payment_details = $form_state
->getValue('payment_details');
if (isset($payment_details)) {
$payment_details['delivery_date'] = $payment_details['delivery_date']
->getTimestamp();
return $payment_details;
}
}
return FALSE;
}