Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I'd suggest doing some debugging using var_dump and Paypal's test tool located here: <a href="https://developer.paypal.com/cgi-bin/devscr?cmd=_ipn-link-session" rel="nofollow">https://developer.paypal.com/cgi-bin/devscr?cmd=_ipn-link-session</a></p> <p>I can understand it becomes difficult and time consuming when working with Third Party Services.</p> <p>It may be worth simply grabbing the POST data, serializing it and applying it to a variable so you can test without PayPal hitting your callback.</p> <p>I'd do something like this initially to grab the PayPal POST.</p> <pre><code>&lt;?php file_put_contents(serialize($_POST), 'post.log'); //Now you have the post request serialized we can grab the contents and apply it to a variable for fast testing. ?&gt; </code></pre> <p>Start of your code:</p> <pre><code>&lt;?php $_POST = unserialize(file_get_content('post.log')); //Now you can execute the script via command line or within your browser without requiring PayPal's testing tool. Use var_dump to investigate what's the issue. $request = "cmd=_notify-validate"; foreach ($_POST as $varname =&gt; $varvalue){ $email .= "$varname: $varvalue\n"; if(function_exists('get_magic_quotes_gpc') and get_magic_quotes_gpc()){ $varvalue = urlencode(stripslashes($varvalue)); } else { $value = urlencode($value); } $request .= "&amp;$varname=$varvalue"; } ?&gt; </code></pre> <p>NOW: This is a bit more effective and efficient when it comes to testing. In your example you were emailing yourself, but not including $result anywhere within the body of the mail function. <a href="http://php.net/manual/en/function.mail.php" rel="nofollow">http://php.net/manual/en/function.mail.php</a></p> <p>PayPal's IPN example uses fsock, although CURL is more effective and easier to use. Also there have been some recent issues with PayPal's sandbox changing. <a href="https://www.paypal-community.com/t5/Selling-on-your-website/IPN-response-problem/m-p/519862/message-uid/519862#U519862" rel="nofollow">https://www.paypal-community.com/t5/Selling-on-your-website/IPN-response-problem/m-p/519862/message-uid/519862#U519862</a></p> <p>Also : To determine what the main cause is, as you've said it appears to be your LAMP stack. Check your logs directory (generally /var/log/) generally from their you'll be able to pinpoint what's failing.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload