public function PurchaseOrderGateway::buildPaymentInstructions in Commerce Purchase Order 8
Builds the payment instructions.
Parameters
\Drupal\commerce_payment\Entity\PaymentInterface $payment: The payment.
Return value
array A render array containing the payment instructions.
Overrides HasPaymentInstructionsInterface::buildPaymentInstructions
File
- src/
Plugin/ Commerce/ PaymentGateway/ PurchaseOrderGateway.php, line 135
Class
- PurchaseOrderGateway
- Provides the On-site payment gateway.
Namespace
Drupal\commerce_purchase_order\Plugin\Commerce\PaymentGatewayCode
public function buildPaymentInstructions(PaymentInterface $payment) {
$instructions = [];
if (!empty($this->configuration['instructions']['value'])) {
$instructions = [
'#type' => 'processed_text',
'#text' => $this->configuration['instructions']['value'],
'#format' => $this->configuration['instructions']['format'],
];
}
return $instructions;
}