You are here

public function SymfonyEventDispatcher::preRefundPayment in Payment 8.2

Fires right before a payment will be refunded.

Parameters

\Drupal\payment\Entity\PaymentInterface $payment: The payment that will be refunded.

Overrides EventDispatcherInterface::preRefundPayment

File

src/SymfonyEventDispatcher.php, line 91

Class

SymfonyEventDispatcher
Dispatches Payment events through Symfony's event dispatcher.

Namespace

Drupal\payment

Code

public function preRefundPayment(PaymentInterface $payment) {
  $event = new PaymentPreRefund($payment);
  $this->symfonyEventDispatcher
    ->dispatch(PaymentEvents::PAYMENT_PRE_REFUND, $event);
}