Showing results for 
Search instead for 
Did you mean: 

Setting up IPN


Setting up IPN

I'm trying to have an email automatically sent to the user after the user makes a payment. To begin to set this up, I followed the instructions given here:


More specifically, I did the following things:


1. I pasted the sample code given at the above link into a php file, which I uploaded to my webhosting server. I named the file listener.php. The location of the file is here:


2. I loged into to paypal sandbox and went to the IPN testing tool (


3. I then entered the url of the listener file:


4. I selected Web Accept.


5. I entered my e-mail address in the payer_email box. My e-mail address is this: jrasmus1 at


6. I then clicked the "send ipn" botton.


The result: I don't recieve any email.  Unfortunately, I don't know how to even begin debugging this.  I was able to send myself an email using a php without using sandbox. I just don't know how to send myself an email using paypal's sandbox.  What step am I missing?


(I read all the relevant tutorials I could find at the paypal site.)




Re: Setting up IPN

I made one step of progress: I replaced "" to "" in the php page. It still doesn't send an email from the sandbox. But if I replace "$_GET['ipn_email']" with my actually e-amail address, then it DOES send me an e-mail through the sandbox. Obviously, I don't want to hardcode my email. You might think the problem is that I didn't correctly enter my email into the sandbox's "payer_email" field. But I tripple checked that it's the same email. (In fact I copied my email into every field I could just to be safe.) Help is appreciated.




Re: Setting up IPN

Okay, it appears to me that paypal's code has a mistake. I replaced their line







And now I'm able to send myself an email from the sandbox. Some questions:


1. Why does paypal's code use 'ipn_email'?  Is this from a previous version of paypal?

2. Will "$_POST['payer_email'];" work when I switch to the live paypal? I don't want to keep paying a $.50 fee just to test which code to use on the live paypal. I assume it's the same as on the sandbox (except change the url).