You are here

public function PayPalCredit::buildLabel in Commerce Braintree 8

Builds a label for the given payment method.

Parameters

\Drupal\commerce_payment\Entity\PaymentMethodInterface $payment_method: The payment method.

Return value

string The label.

Overrides PaymentMethodTypeInterface::buildLabel

File

src/Plugin/Commerce/PaymentMethodType/PayPalCredit.php, line 26

Class

PayPalCredit
Provides the PayPal Credit payment method type.

Namespace

Drupal\commerce_braintree\Plugin\Commerce\PaymentMethodType

Code

public function buildLabel(PaymentMethodInterface $payment_method) {
  $args = [
    '@paypal_mail' => $payment_method->paypal_mail->value,
  ];
  return $this
    ->t('PayPal Credit (@paypal_mail)', $args);
}