There is this awesome article on how to create a Magento plugin for a new payment gateways which is one of the most widely used article.
This article has link to download/clone the code from the GitHub.
Recently, we need to create a payment gateway module for Ecorepay (https://www.ecorepay.cc/) which is (yet) an(other) international payment gateway
We thought of sharing it with Magento community through GitHub.
This is tested with Magento 1.7 and it works fine. There are still tweaks that we would like to do but it is good enough as the first draft.
Have a look and let us know if you need any help in setting it up.