I wanted to know what PayPal was sending back to me in their return post. I added a variable to mod.simple_commerce.php to let me see it.
In the perform_actions function, somewhere that all the post variables are set, I added this:
$debug = '';
foreach($_POST as $key => $value)
{
$debug = $debug . $key . ': ' . $value . ' ';
}
$this->post['all'] = $debug;
This let me put {all} at the bottom of my email template.
================================
Or, an alternate method to try:
In order to see what the IPN response is sending you, open up mod.simple_commerce.php and at line 348, you’ll see:
global $EXT, $PREFS, $IN, $DB, $REGX;
Right below that line add the following:
ob_start();
print_r($_POST);
$msg = ob_get_contents();
ob_end_clean();
if ( ! class_exists('EEmail'))
{
require PATH_CORE.'core.email'.EXT;
}
$email = new EEmail;
$email->initialize();
$email->from($PREFS->ini('webmaster_email'));
$email->to('you@email.com');
$email->subject('IPN test');
$email->message($msg);
$email->Send();
Change the email address from you@email.com to your email address, and you should be able to see if you are getting data back from paypal.
Source: http://expressionengine.com/forums/viewthread/73950/P18/#367834
Category:Commerce -> PayPal Category:Hacks
