Payment gateway is a bridge between clients and merchants that use to pay the amount for online services or products through secure payment system that accept debit or credit card transactions. A payment gateway is an authorize service for debit and credit card transaction and it is used to communicate between business, card issuer and business bank. Payment Gateway is a remotely hosted software that enable merchant to accept debit card and credit card.
When customer place order for purchasing product from shopping cart and click on Submit or equivalent button, then you have to provide name, debit/credit card details to him. Then credit card transaction capture by payment gateway and then he encrypts the transaction information and routes to credit card processor then we get decline or approval notice.