PaymentEvents::PAYMENT_METHOD_LOADED_EVENT => 'formatHandlerIdentifier',
'payment_method.partial_loaded' => 'formatHandlerIdentifier',
];
} public function formatHandlerIdentifier(EntityLoadedEvent
$event): void
{ /** @var Entity $entity */
foreach ($event->
getEntities() as $entity) { $entity->
assign([ 'shortName' =>
$this->
getShortName($entity),
'formattedHandlerIdentifier' =>
$this->
getHandlerIdentifier($entity),
'synchronous' =>
$this->
isSynchronous($entity),
'asynchronous' =>
$this->
isAsynchronous($entity),
'prepared' =>
$this->
isPrepared($entity),
'refundable' =>
$this->
isRefundable($entity),
'recurring' =>
$this->
isRecurring($entity),
]);
} } private function getHandlerIdentifier(Entity
$entity): string
{