You are viewing the PayPal Community Archives. This content may be old or outdated. Leave the Archive
Chat with our moderator team every Wednesday between 1-2pm PT (4-5pm ET). Learn more in Community Events
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: https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_admin_IPNImpleme...
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: http://unlimit3dstudios.com/listener.php
2. I loged into to paypal sandbox and went to the IPN testing tool (https://developer.paypal.com/us/cgi-bin/devscr)
3. I then entered the url of the listener file: http://unlimit3dstudios.com/listener.php
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 gmail.com
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.)
I made one step of progress: I replaced "www.paypal.com" to "www.sandbox.paypal.com" 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.
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).