I am making a payment gateway and I need to redirect from the invoice page to an external url. Basically when an order is created at Magento I create an order in a 3rd party app with curl, then I get unique ID from that order which is used to redirect to an external invoice page.
The question is how do i make that external redirect? Most logical solution seems to override the checkout controller and in that controller I would call my model, model returns that unique ID and I make redirect to the invoice page.
Problem is I can't understand how to override the checkout controller.