You are here

public function Payment::getPaymentMethod in Commerce Core 8.2

Gets the payment method.

Return value

\Drupal\commerce_payment\Entity\PaymentMethodInterface|null The payment method entity, or null if unknown.

Overrides PaymentInterface::getPaymentMethod

File

modules/payment/src/Entity/Payment.php, line 110

Class

Payment
Defines the payment entity class.

Namespace

Drupal\commerce_payment\Entity

Code

public function getPaymentMethod() {
  return $this
    ->get('payment_method')->entity;
}