to handle the financial transaction, and normally the 'proceed to payment' button on your shopping cart will transfer the customer seamlessly to the gateway server. That server will be secure, so there's no need for you to operate https pages.
Most people tend to use one of the excellent shopping cart applications - like Actinic - which have everything built in and ready to go. All you have to do is set things up with your chosen Gateway processor, and enter the necessary information into the shopping cart configuration section.
Once the transaction is complete the Gateway server will usually call a "Thank you for your purchase" script which resides on your server.