The thing to keep in mind is that developing a payment gateway and a third party processing service are two entirely different things. 2Checkout is not a gateway but rather a third party processor - at least, to use the common definition of it.
You may want to do a search on the forums here regarding that as there have been a number of discussions on it - but long story short, it is nearly impossible to setup a new "2CO-type" company these days.
Programming skills are just one small piece in a huge puzzle. You would need a vast amount of capital, banking connections and an experienced team for risk management, deployment, support, operations, etc.
Even if your goal is to just build a payment gateway like Authorize.Net - that is a daunting task. The front-end customer part of the interface is the easy part.
The tricky part is when you have to go through VISA's CISP compliance audits, setup multiple redundant servers, setup and configure interfaces into the major bankcard processing networks and pay some of them to help you integrate & audit your finished system.
This can take many, many months of hard work, discussion, planning and implementation and many tens of thousands of dollars (at just the very most basic level!) to complete.
In no way am I trying to discourage you from building your own system - I'm just pointing out that it is a significant undertaking which you will want to be prepared for prior to starting to spend any time or money on it.
CDGcommerce.com - Trusted Merchant Account Solutions since 1998
Many thousands of successful, growing businesses benefit from our expertise every day. You can, too!
We help merchants to eliminate gateway costs, reduce & mitigate fraud and achieve streamlined PCI compliance. Learn more today at http://www.cdgcommerce.com - we look forward to helping your business grow!