You would need to look through the API documentation from the gateway you wish to use for examples of the code to write.
The code for processing the transaction is added to the confirm page by the wizard, you could remove that code and replace with your code.