- /**
- * Capture the payment online
- * Requires an invoice. If there is no invoice specified, will automatically prepare an invoice for order
- * Updates transactions hierarchy, if required
- * Updates payment totals, updates order status and adds proper comments
- *
- * @param null|Invoice $invoice
- * @throws \Magento\Framework\Exception\LocalizedException
- * @return $this
- */
- public function capture($invoice = null)
- {
- return $this->orderPaymentProcessor->capture($this, $invoice);
- }