Good day to all.
I have a booking site. Here I need to integrate a paypal payment.
Scenario is like this: X enters into the site, fill in a form with a lot of de
I've recently done this. You can use PayPal's xclick button, to send custom data (that is, price and shipping) to PayPal. Then the customer will pay via PayPal and send an instant payment notification to a file on your server of your choice, then validate the data using the IPN and process the order how you like.
Once the customer pays, PayPal will notify your script, and you can do whatever you want after that to process a successful payment.
To process the payment in your PHP file: Paypal Developers LINK
* NEVER TRUST ANY USER SUBMITTED DATA *
With all PayPal transactions, users can edit the data in the form and submit unwanted or incorrect data. You should save all your variables (such as ID, amount, shipping, etc...) in a database, and validate when the IPN request is received back from PayPal (to make sure they match).
Treat a PayPal transaction with the same security as you do with SQL data, escape all variables, never trust any user submitted data and always validate your data.