How to capture payment for the created invoice. In Magento1.x it is like
$invoice = Mage::getModel('sales/Service_Order', $this->getOrder())->prepareInvoice();
$invoice->setRequestedCaptureCase(Mage_Sales_Model_Order_Invoice::CAPTURE_ONLINE);
$invoice->register();
I have the order increment id
which has order status pending
. Invoice needs to be generated for that order by loading increment id
and do invoice capture operation. I am expecting the invoice capture operation will set transaction id(Ex. 2121) and move the order status to completed