HEX
Server: Apache/2.4.25
System: Linux ion14 4.9.0-8-amd64 #1 SMP Debian 4.9.144-3.1 (2019-02-19) x86_64
User: (10087)
PHP: 7.4.30
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,system, exec, shell_exec, passthru, popen, proc_open
Upload Files
File: /home/www/web115/wordpress/wp-content/plugins/digimember/ipn.php
<?php

define( 'NCORE_IS_AJAX',  false );
define( 'NCORE_IS_IPN',   true );
define( 'WP_USE_THEMES',  false );
define( 'WP_ADMIN',       true  ); // prevent 404 not found errors and redirects
$_SERVER['PHP_SELF'] = '/wp-admin/digimember/ipn.php'; // prevent php notice message (Undefined offset) in vars.php
define( 'DONOTCACHEPAGE', 1 );


require_once dirname(__FILE__).'/digimember.php';

function digi_retrieveIpnId()
{
    if (isset($_GET['dm_ipn']))
    {
        return $_GET['dm_ipn'];
    }

    if (isset($_POST['ipn_id']))
    {
        return $_POST['ipn_id'];
    }

    if (isset($_GET['ipn_id']))
    {
        return $_GET['ipn_id'];
    }

    return false;
}


// Overwrite potential 404 on plugin php files
header("HTTP/1.1 200 OK");
header("Status: 200 OK") ;

$api = ncore_api();

$is_active = $api->pluginIsActive();
if (!$is_active)
{
    die('ERROR: Plugin is not active');
}

$have_support_info_request = isset( $_GET['dm_support_key'] );
if ($have_support_info_request)
{
    /** @var ncore_SupportLogic $model */
    $model = $api->load->model( 'logic/support' );
    $model->handleSupportInfoRequest();
}


$have_post = isset($_POST) && count($_POST);

if ($have_post)
{
    $apilog = $api->load->model( 'data/apilog' );
    $apilog->log( 'ipn' );
}
elseif (NCORE_DEBUG)
{
    $apilog = $api->load->model( 'data/apilog' );
    $apilog->replay( 'ipn' );
}

$ipn_id = digi_retrieveIpnId();
if (!$ipn_id)
{
    die('ERROR: Invalid ipn url - see DigiMember admin settings for correct ipn url.');
}

$handler = $api->load->library( 'payment_handler' );

try
{
    $handler->setPlugin( $ipn_id );
    $handler->handleIpnRequest();
}

catch (Exception $e)
{
    die( 'ERROR: ' . $e->getMessage() );
}