public function Payment::getType in Commerce Core 8.2
Gets the payment type.
Return value
\Drupal\commerce_payment\Plugin\Commerce\PaymentType\PaymentTypeInterface The payment type.
Overrides PaymentInterface::getType
File
- modules/
payment/ src/ Entity/ Payment.php, line 81
Class
- Payment
- Defines the payment entity class.
Namespace
Drupal\commerce_payment\EntityCode
public function getType() {
$payment_type_manager = \Drupal::service('plugin.manager.commerce_payment_type');
return $payment_type_manager
->createInstance($this
->bundle());
}