Hi, Is it possible to integrate Paypal into a PHP script? I'd like to create a script when the user has paid correctly, there should automaticly run a PHP script to e.g. execute MySQL queries. E.g. User goes to my site -> click the Paypal pay button -> user goes to Paypal to pay -> Payment complete, user returns to my site -> MySQL queries executed. I think it is possible, but can't really find something on the Paypal website. Thanks!
What you're looking for is the Instant Payment Notification (https://www.paypal.com/ipn) After any transition, paypal runs your script passing you all the details of the payment.
There are a number of available Paypal API's that allow this. IPN is the most simple method. Personally, I like the express checkout method much better, as your visitor starts and ends on your website. With IPN your visitor ends on Paypal's site, and then can opt not to return to your website. IPN provides a call-back, but it is far easier and more reliable when your visitor triggers the event and not an API callback. It's also a significant improvement in usability, which reduces purchase abandonment.
it is quite possible and I depend on it. They even provide PHP examples. Check out their developer forums. You might need to be paypal pro level (or whatever they call it).
also, IPN is is independant of the payment method. you can have an ipn call for express pay, cc pay, or even virtual term pay. IPN gives and independent verification of payment and lets you trigger such things as inventory adjust, etc...