public function PaymentMethod::getType in Commerce Core 8.2
Gets the payment method type.
Return value
\Drupal\commerce_payment\Plugin\Commerce\PaymentMethodType\PaymentMethodTypeInterface The payment method type.
Overrides PaymentMethodInterface::getType
File
- modules/
payment/ src/ Entity/ PaymentMethod.php, line 87
Class
- PaymentMethod
- Defines the payment method entity class.
Namespace
Drupal\commerce_payment\EntityCode
public function getType() {
$payment_method_type_manager = \Drupal::service('plugin.manager.commerce_payment_method_type');
return $payment_method_type_manager
->createInstance($this
->bundle());
}