Merge pull request #24233 from demeritcowboy/zetapatookens
[civicrm-core.git] / extern / authorizeIPN.php
CommitLineData
6a488035
TO
1<?php
2/*
3 +--------------------------------------------------------------------+
6b7eb9df 4 | Copyright CiviCRM LLC. All rights reserved. |
6a488035 5 | |
6b7eb9df
TO
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 |
6a488035 9 +--------------------------------------------------------------------+
d25dd0ee 10 */
6a488035
TO
11
12/**
13 * @package CRM
ca5cec67 14 * @copyright CiviCRM LLC https://civicrm.org/licensing
6a488035
TO
15 */
16
ba1e1ab6
CB
17if (defined('PANTHEON_ENVIRONMENT')) {
18 ini_set('session.save_handler', 'files');
19}
6a488035
TO
20session_start();
21
22require_once '../civicrm.config.php';
d523d24a 23CRM_Core_Config::singleton();
414e3596 24$log = new CRM_Utils_SystemLogger();
6c8d1617 25$log->alert('payment_notification processor_name=AuthNet', $_REQUEST);
6a488035 26
0dbefed3 27$authorizeNetIPN = new CRM_Core_Payment_AuthorizeNetIPN($_REQUEST);
92e4c2a5 28try {
0dbefed3
EM
29 $authorizeNetIPN->main();
30}
56fdfc52 31catch (CRM_Core_Exception $e) {
0dbefed3
EM
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}