Merge pull request #24233 from demeritcowboy/zetapatookens
[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 */
16
17 if (defined('PANTHEON_ENVIRONMENT')) {
18 ini_set('session.save_handler', 'files');
19 }
20 session_start();
21
22 require_once '../civicrm.config.php';
23 CRM_Core_Config::singleton();
24 $log = new CRM_Utils_SystemLogger();
25 $log->alert('payment_notification processor_name=AuthNet', $_REQUEST);
26
27 $authorizeNetIPN = new CRM_Core_Payment_AuthorizeNetIPN($_REQUEST);
28 try {
29 $authorizeNetIPN->main();
30 }
31 catch (CRM_Core_Exception $e) {
32 CRM_Core_Error::debug_log_message($e->getMessage());
33 CRM_Core_Error::debug_var('error data', $e->getErrorData(), TRUE, TRUE);
34 CRM_Core_Error::debug_var('REQUEST', $_REQUEST, TRUE, TRUE);
35 echo "The transaction has failed. Please review the log for more detail";
36 }