What I'm looking to do is send a confirmation email after a paypal purchase has been made. I'm looking at using paypal NVP for this.
I also need the ability to issue a refund to a customer after they have purchased it.
How can I determine the user successully completed the payment on paypal? Please provide code samples.