A payment gateway is a software program integrated to a merchant’s website to transmit transaction data to: Credit Card Net Banking Cash Card Mobile Payment acquirer for authorization and settlement
It includes whether there are sufficient funds available, whether the details all matched correctly and whether the has been any fraudulent activity.  In order to check these details, the Payment Gateway will communicate with the Card Schemes and Issuing Banks and then report back with its findings and relevant transaction response.

1The E-Tail Process - Siri 139m
2The E-Tail Process - Siri 237m