I want to know that when my client will pay me via PayPal how I can I get it into my database I mean what code I need to write in PHP to get it.
The docs are here
https://developer.paypal.com/docs/integration/direct/express-checkout/integration-jsv4/choose-integration-method/
Only select PHP into code sample, browse in sections and you can read all samples.