public function PayflowLink::buildPaymentOperations in Commerce PayPal 8
Builds the available operations for the given payment.
Parameters
\Drupal\commerce_payment\Entity\PaymentInterface $payment: The payment.
Return value
array The operations. Keyed by operation ID, each value is an array with the following keys:
- title: The operation title.
- page_title: The operation page title.
- plugin_form: The plugin form ID.
- access: Whether the operation is allowed for the given payment.
Overrides PaymentGatewayBase::buildPaymentOperations
File
- src/
Plugin/ Commerce/ PaymentGateway/ PayflowLink.php, line 491
Class
- PayflowLink
- Provides the PayPal Payflow Link payment gateway.
Namespace
Drupal\commerce_paypal\Plugin\Commerce\PaymentGatewayCode
public function buildPaymentOperations(PaymentInterface $payment) {
$operations = parent::buildPaymentOperations($payment);
$operations['reference'] = [
'title' => $this
->t('Reference'),
'page_title' => $this
->t('Refund payment'),
'plugin_form' => 'reference-payment',
'access' => $this
->canReferencePayment($payment),
];
return $operations;
}