Steps for the payment gateway processing in PHP:-
1-Customer place order on website, by pressing, the “submit order” button.
2-The customer’s web browser encrypts the information to be sent between the browser and the merchant’s webserver. This is done via SSL (Secure Socket Layer) encryption.
3- The merchant then forwards the transaction details to their payment gateway.
4- The payment gateway forwards the transaction information to the payment processor used by the merchant’s acquiring bank.
5-The payment processor forwards the transaction information to the card association (i.e., Visa/MasterCard)
6-The card issuing bank receives the authorization request and sends a response back to the processor (via the same process as the request for authorization) with a response code. In addition to determining the fate of the payment, (i.e. approved or declined) the response code is used to define the reason why the transaction failed (such as insufficient funds, or bank link not available)
7-The processor forwards the response to the payment gateway.
8-The payment gateway receives the response, and forwards it on to the website.