Creating a payment gateway extension
If you are confused by how payment gateway extensions are recognized by the payment gateway event (as I was), all you need to do is create a PHP file named extension/[extension_name]/classes/[extension_name]gateway.php and it will automatically be added to the list when editing a payment gateway event.
There's no need to edit or override paymentgateways.ini.append.php
Check out the ezpaypal extension for ideas on how the payment class is constructed.