I had changed the default prestashop payment workflow like payment of a order can be completed from order history page by creating a button in the order history where the user can proceed to the gateway. In the payment gateway it is like straightforward, completing payment with cart details and total elements.
$address = new Address((int)$this->context->cart->id_address_invoice);
$address_state = new State($address->id_state);
$customer = new Customer($this->context->cart->id_customer);
$amount = $this->context->cart->getOrderTotal();
so $amount is coming zero because I am not entering it into the cart. My question is how I pass the current order id(stored in ParentOrderController.php), so I can fetch and pass the details to gateway and total amount then update the order instead of create?