From 4b7d50ce3d5289d9d9123b297402753d89dfce36 Mon Sep 17 00:00:00 2001 From: eileen Date: Tue, 23 Apr 2013 12:43:33 +1200 Subject: [PATCH] CRM-12405 - patch for additional logging on failed IPN calls --- CRM/Core/Config.php | 12 ++++++++++-- CRM/Core/Payment/AuthorizeNetIPN.php | 2 ++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/CRM/Core/Config.php b/CRM/Core/Config.php index cfda390e50..07752d85eb 100644 --- a/CRM/Core/Config.php +++ b/CRM/Core/Config.php @@ -518,6 +518,7 @@ class CRM_Core_Config extends CRM_Core_Config_Variables { } elseif ($mailingInfo['outBound_option'] == CRM_Mailing_Config::OUTBOUND_OPTION_SMTP) { if ($mailingInfo['smtpServer'] == '' || !$mailingInfo['smtpServer']) { + CRM_Core_Error::debug_log_message(ts('There is no valid smtp server setting. Click Administer CiviCRM >> Global Settings to set the SMTP Server.', array(1 => CRM_Utils_System::url('civicrm/admin/setting', 'reset=1')))); CRM_Core_Error::fatal(ts('There is no valid smtp server setting. Click Administer CiviCRM >> Global Settings to set the SMTP Server.', array(1 => CRM_Utils_System::url('civicrm/admin/setting', 'reset=1')))); } @@ -549,6 +550,7 @@ class CRM_Core_Config extends CRM_Core_Config_Variables { if ($mailingInfo['sendmail_path'] == '' || !$mailingInfo['sendmail_path'] ) { + CRM_Core_Error::debug_log_message(ts('There is no valid sendmail path setting. Click Administer CiviCRM >> Global Settings to set the Sendmail Server.', array(1 => CRM_Utils_System::url('civicrm/admin/setting', 'reset=1')))); CRM_Core_Error::fatal(ts('There is no valid sendmail path setting. Click Administer CiviCRM >> Global Settings to set the Sendmail Server.', array(1 => CRM_Utils_System::url('civicrm/admin/setting', 'reset=1')))); } $params['sendmail_path'] = $mailingInfo['sendmail_path']; @@ -563,8 +565,14 @@ class CRM_Core_Config extends CRM_Core_Config_Variables { elseif ($mailingInfo['outBound_option'] == CRM_Mailing_Config::OUTBOUND_OPTION_MOCK) { self::$_mail = Mail::factory('mock', $params); } - else { - CRM_Core_Session::setStatus(ts('There is no valid SMTP server Setting Or SendMail path setting. Click Administer CiviCRM >> Global Settings to set the OutBound Email.', array(1 => CRM_Utils_System::url('civicrm/admin/setting', 'reset=1'))), ts('Check Settings'), 'alert'); + elseif ($mailingInfo['outBound_option'] == 2) { + CRM_Core_Error::debug_log_message(ts('Outbound mail has been disabled. Click Administer CiviCRM >> Global Settings to set the OutBound Email.', array(1 => CRM_Utils_System::url('civicrm/admin/setting', 'reset=1')))); + CRM_Core_Session::setStatus(ts('Outbound mail has been disabled. Click Administer CiviCRM >> Global Settings to set the OutBound Email.', array(1 => CRM_Utils_System::url('civicrm/admin/setting', 'reset=1')))); + } + else{ + CRM_Core_Error::debug_log_message(ts('There is no valid SMTP server Setting Or SendMail path setting. Click Administer CiviCRM >> Global Settings to set the OutBound Email.', array(1 => CRM_Utils_System::url('civicrm/admin/setting', 'reset=1')))); + CRM_Core_Session::setStatus(ts('There is no valid SMTP server Setting Or SendMail path setting. Click Administer CiviCRM >> Global Settings to set the OutBound Email.', array(1 => CRM_Utils_System::url('civicrm/admin/setting', 'reset=1')))); + CRM_Core_Error::debug_var('mailing_info', $mailingInfo); } } return self::$_mail; diff --git a/CRM/Core/Payment/AuthorizeNetIPN.php b/CRM/Core/Payment/AuthorizeNetIPN.php index efb95b513d..ec352f2ab8 100644 --- a/CRM/Core/Payment/AuthorizeNetIPN.php +++ b/CRM/Core/Payment/AuthorizeNetIPN.php @@ -295,6 +295,8 @@ INNER JOIN civicrm_membership_payment mp ON m.id = mp.membership_id AND mp.contr ); if ($abort && $value === NULL) { CRM_Core_Error::debug_log_message("Could not find an entry for $name in $location"); + CRM_Core_Error::debug_var('POST', $_POST); + CRM_Core_Error::debug_var('REQUEST', $_REQUEST); echo "Failure: Missing Parameter

"; exit(); } -- 2.25.1