Payment gateways are e-commerce application service provider services that authorize credit card payments for e-businesses, online retailers, bricks and clicks, or traditional brick and mortar.
Payment gateways link your website to your processing network and merchant account. In other words they facilitates the transfer of information between a website and the Front End Processor or acquiring bank.
Resources and PHP libraries to check out: