public function Check::customerView in Ubercart 8.4
Called when an order is being viewed by a customer.
Parameters
\Drupal\uc_order\OrderInterface $order: The order that is being viewed.
Return value
array A render array.
Overrides PaymentMethodPluginBase::customerView
File
- payment/
uc_payment_pack/ src/ Plugin/ Ubercart/ PaymentMethod/ Check.php, line 132
Class
- Check
- Defines the check payment method.
Namespace
Drupal\uc_payment_pack\Plugin\Ubercart\PaymentMethodCode
public function customerView(OrderInterface $order) {
$build = [];
$result = $this->database
->query('SELECT clear_date FROM {uc_payment_check} WHERE order_id = :id ', [
':id' => $order
->id(),
]);
if ($clear_date = $result
->fetchField()) {
$build['#markup'] = $this
->t('Check received') . '<br />' . $this
->t('Expected clear date:') . '<br />' . \Drupal::service('date.formatter')
->format($clear_date, 'uc_store');
}
return $build;
}