Starting a Payment gateway

I’m really interested in starting my own payment gateway but don’t know quite how. I’m not sur to do it in PHP or ASP. How would you get the money from the purchasers credit card/bank account to the sellers accounts? Do you need special clearance from the banks/credit card companies? Well, if you have any answers or some more questions please post…