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\EntityCode
public function getPaymentMethod() {
return $this
->get('payment_method')->entity;
}