public function SymfonyEventDispatcher::preCapturePayment in Payment 8.2
Fires right before a payment will be captured.
Parameters
\Drupal\payment\Entity\PaymentInterface $payment: The payment that will be captured.
Overrides EventDispatcherInterface::preCapturePayment
File
- src/
SymfonyEventDispatcher.php, line 82
Class
- SymfonyEventDispatcher
- Dispatches Payment events through Symfony's event dispatcher.
Namespace
Drupal\paymentCode
public function preCapturePayment(PaymentInterface $payment) {
$event = new PaymentPreCapture($payment);
$this->symfonyEventDispatcher
->dispatch(PaymentEvents::PAYMENT_PRE_CAPTURE, $event);
}