public function Sermepa::buildPaymentInstructions in Commerce sermepa 8.2
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/ Sermepa.php, line 240
Class
- Sermepa
- Provides the Sermepa/Redsýs payment gateway.
Namespace
Drupal\commerce_sermepa\Plugin\Commerce\PaymentGatewayCode
public function buildPaymentInstructions(PaymentInterface $payment) {
$configuration = $this
->getConfiguration();
$instructions = [];
if (!empty($configuration['instructions']['value'])) {
$instructions = [
'#type' => 'processed_text',
'#text' => $configuration['instructions']['value'],
'#format' => $configuration['instructions']['format'],
];
}
return $instructions;
}