public function Check::cartDetails in Ubercart 8.4
Returns the form or render array to be displayed at checkout.
Parameters
\Drupal\uc_order\OrderInterface $order: The order which is being processed.
array $form: The checkout form array.
\Drupal\Core\Form\FormStateInterface $form_state: The checkout form state array.
Return value
array A form or render array.
Overrides PaymentMethodPluginBase::cartDetails
File
- payment/
uc_payment_pack/ src/ Plugin/ Ubercart/ PaymentMethod/ Check.php, line 74
Class
- Check
- Defines the check payment method.
Namespace
Drupal\uc_payment_pack\Plugin\Ubercart\PaymentMethodCode
public function cartDetails(OrderInterface $order, array $form, FormStateInterface $form_state) {
$build['instructions'] = [
'#markup' => $this
->t('Checks should be made out to:'),
];
$address = Address::create($this->configuration['address']);
$address
->setFirstName($this->configuration['name']);
$build['address'] = [
'#prefix' => '<p>',
'#markup' => (string) $address,
'#suffix' => '</p>',
];
$build['policy'] = [
'#prefix' => '<p>',
'#markup' => Html::escape($this->configuration['policy']),
'#suffix' => '</p>',
];
return $build;
}