ataria Posted May 19, 2007 Share Posted May 19, 2007 Okay. so, on my site, users are allowed to donate. When they donate (via paypal) they are directed back to the processing page. I use this: if($_SERVER[HTTP_REFERER] != 'https://www.paypal.com/cgi-bin/webscr') { echo "<center><b>Error.</b> "; to check to see if they came from paypal, which prevents false donations / receiving the donation item multiple times with one payment. BUT, It does not work . Is there any other way to secure that only one donation item is given? Quote Link to comment https://forums.phpfreaks.com/topic/52133-paypal-page-return/ Share on other sites More sharing options...
ataria Posted May 19, 2007 Author Share Posted May 19, 2007 Anyone? Quote Link to comment https://forums.phpfreaks.com/topic/52133-paypal-page-return/#findComment-257237 Share on other sites More sharing options...
kenrbnsn Posted May 19, 2007 Share Posted May 19, 2007 What do you mean by "it does not work"? Explain what is happening. Did you echo the contents of $_SERVER['HTTP_REFERER'] to see what it contains? Ken Quote Link to comment https://forums.phpfreaks.com/topic/52133-paypal-page-return/#findComment-257246 Share on other sites More sharing options...
ataria Posted May 19, 2007 Author Share Posted May 19, 2007 The process gets stopped and says there is an error, no not a PHP/MySQL error, the error message I made. I echo'd the contents, and, it does not show anything . Quote Link to comment https://forums.phpfreaks.com/topic/52133-paypal-page-return/#findComment-257249 Share on other sites More sharing options...
kenrbnsn Posted May 19, 2007 Share Posted May 19, 2007 Please post all of your code between tags. If you do a <?php echo '<pre>' . print_r($_SERVER,true) . '</pre>'; ?> is there anything that indicates what is invoking your script? Ken Quote Link to comment https://forums.phpfreaks.com/topic/52133-paypal-page-return/#findComment-257251 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.