fix re-use of variable
[civicrm-core.git] / extern / ipn.php
index 4ec25af6e68f957015bf6e937f2b142dbcdab9d6..65c8e83a1d858dcf45780bea45e38427ff1df1fd 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.5                                                |
+ | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
  | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
@@ -38,22 +38,23 @@ require_once '../civicrm.config.php';
 /* Cache the real UF, override it with the SOAP environment */
 
 $config = CRM_Core_Config::singleton();
-
+$log = new CRM_Utils_SystemLogger();
 if (empty($_GET)) {
+  $log->alert('payment_notification processor_name=PayPal', $_REQUEST);
   $paypalIPN = new CRM_Core_Payment_PayPalProIPN($_REQUEST);
 }
 else {
+  $log->alert('payment_notification PayPal_Standard', $_REQUEST);
   $paypalIPN = new CRM_Core_Payment_PayPalIPN();
   // @todo upgrade standard per Pro
 }
-try{
+try {
   $paypalIPN->main();
 }
-catch(CRM_Core_Exception $e) {
+catch (CRM_Core_Exception $e) {
   CRM_Core_Error::debug_log_message($e->getMessage());
   CRM_Core_Error::debug_var('error data', $e->getErrorData(), TRUE, TRUE);
   CRM_Core_Error::debug_var('REQUEST', $_REQUEST, TRUE, TRUE);
   //@todo give better info to logged in user - ie dev
   echo "The transaction has failed. Please review the log for more detail";
 }
-