unit test for case audit
[civicrm-core.git] / extern / authorizeIPN.php
1 <?php
2 /*
3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
5 | |
6 | This work is published under the GNU AGPLv3 license with some |
7 | permitted exceptions and without any warranty. For full license |
8 | and copyright information, see https://civicrm.org/licensing |
9 +--------------------------------------------------------------------+
10 */
11
12 /**
13 * @package CRM
14 * @copyright CiviCRM LLC https://civicrm.org/licensing
15 * $Id$
16 */
17
18 if (defined('PANTHEON_ENVIRONMENT')) {
19 ini_set('session.save_handler', 'files');
20 }
21 session_start();
22
23 require_once '../civicrm.config.php';
24 $config = CRM_Core_Config::singleton();
25 $log = new CRM_Utils_SystemLogger();
26 $log->alert('payment_notification processor_name=AuthNet', $_REQUEST);
27
28 $authorizeNetIPN = new CRM_Core_Payment_AuthorizeNetIPN($_REQUEST);
29 try {
30 $authorizeNetIPN->main();
31 }
32 catch (CRM_Core_Exception $e) {
33 CRM_Core_Error::debug_log_message($e->getMessage());
34 CRM_Core_Error::debug_var('error data', $e->getErrorData(), TRUE, TRUE);
35 CRM_Core_Error::debug_var('REQUEST', $_REQUEST, TRUE, TRUE);
36 echo "The transaction has failed. Please review the log for more detail";
37 }