Ejemplo n.º 1
0
function safepay_error($msg)
{
    global $order_id, $payment_id, $db;
    global $vars;
    $db->log_error("SAFEPAY ERROR: {$msg}<br />\n" . get_dump($vars));
    die($msg);
}
Ejemplo n.º 2
0
function p_log($file, $str, $append = false)
{
    $path_found = false;
    // võimalikud logifaili asukohad - esimesse kataloog, mis eksisteerib, sinna ka salvestatakse
    $paths = [P_TMP, "/var/tmp"];
    foreach ($paths as $path) {
        if (file_exists($path)) {
            $path_found = true;
            break;
        }
    }
    // kui ei leitud kataloogi
    if (!$path_found) {
        return false;
    }
    // kui ei ole puhas string, siis hangi antud objekti või massiivi dump
    if (!is_string($str)) {
        $str = get_dump($str);
    }
    // kas õnnestub faili avamine kirjutamiseks
    if (!($fp = fopen($path . "/" . $file, $append ? "a" : "w"))) {
        return false;
    }
    // kirjuta dump faili
    fputs($fp, $str . "\n");
    fclose($fp);
    return true;
}
Ejemplo n.º 3
0
function nochex_error($msg)
{
    global $txn_id, $payment_id;
    global $vars;
    #    header("Status: 500 Internal Server Error");
    fatal_error(sprintf(_PLUG_PAY_NOCHEX_FERROR, $msg, $txn_id, $payment_id, '<br />') . "\n" . get_dump($vars));
}
Ejemplo n.º 4
0
function adultprocessor_error($msg)
{
    global $order_id, $payment_id, $pnref, $db;
    global $vars;
    $db->log_error(sprintf("ADULTPROCESSOR ERROR: %s (Details: PNREF:%s, invoice:%d)%s", $msg, $pnref, $payment_id, '<br />') . "\n" . get_dump($vars));
    die($msg);
}
Ejemplo n.º 5
0
function alertpay_error($msg)
{
    global $order_id, $payment_id, $pnref, $db;
    global $vars;
    $db->log_error(sprintf(_PLUG_PAY_ALERTPAY_FERROR, $msg, $pnref, $payment_id, '<br />') . "\n" . get_dump($vars));
    die($msg);
}
Ejemplo n.º 6
0
function ccbill_error($msg)
{
    global $order_id, $payment_id, $pnref;
    global $vars, $db;
    $db->log_error("ccbill ERROR: {$msg} (Details: PNREF:'{$pnref}', invoice:'{$payment_id}')<br />\n" . get_dump($vars));
    die("ccBill plugin error, please don't run this file manually - it is not supposed to work from your browser");
}
Ejemplo n.º 7
0
function payflow_error($msg)
{
    global $order_id, $invoice, $pnref;
    global $vars;
    header("HTTP/1.1 404 Not found");
    header("Status: 404 Not Found");
    fatal_error(sprintf(_PLUG_PAY_PAYFLINK_FERROR, $msg, $pnref, $invoice, '<br />') . "\n" . get_dump($vars));
}
Ejemplo n.º 8
0
function ematters_error($msg)
{
    global $order_id, $invoice, $pnref;
    global $vars;
    header("HTTP/1.1 404 Not found");
    header("Status: 404 Not Found");
    fatal_error("EMATTERS ERROR: {$msg} (Details: invoice:'{$invoice}')<br />\n" . get_dump($vars));
}
Ejemplo n.º 9
0
<?php

include "../../../config.inc.php";
$this_config = $plugin_config['payment']['realex_redirect'];
function get_dump($var)
{
    //dump of array
    $s = "";
    foreach ((array) $var as $k => $v) {
        $s .= "{$k} => {$v}<br />\n";
    }
    return $s;
}
$vars = get_input_vars();
$db->log_error("RealEx Redirect DEBUG:<br />" . get_dump($vars));
$merchant_id = $vars['MERCHANT_ID'];
$pnref = $vars['PASREF'];
$result = $vars['RESULT'];
$message = $vars['MESSAGE'];
$payment_id = intval($vars['ORDER_ID']);
$cvnresult = $vars['CVNRESULT'];
$hash = $vars['TIMESTAMP'] . "." . $merchant_id . "." . $payment_id . "." . $result . "." . $message . "." . $pnref . "." . $vars['AUTHCODE'];
$response_valid = false;
if ($vars['MD5HASH']) {
    $hash = md5($hash);
    $hash = $hash . "." . $this_config['secret'];
    $hash = md5($hash);
    if ($vars['MD5HASH'] == $hash) {
        $response_valid = true;
    }
} else {
Ejemplo n.º 10
0
    //dump of array
    $s = "";
    foreach ((array) $var as $k => $v) {
        $s .= "{$k} => {$v}<br />\n";
    }
    return $s;
}
function allpay_error($msg)
{
    global $order_id, $payment_id, $pnref, $db;
    global $vars;
    $db->log_error(sprintf(_PLUG_PAY_ALLPAY_FERROR, $msg, $pnref, $payment_id, '<br />'));
    echo "OK";
    exit;
}
$db->log_error("AllPay DEBUG: " . get_dump($vars));
//////////////////////////////////////////////////////////////////////////////
//
//                           M   A   I   N
//
//////////////////////////////////////////////////////////////////////////////
/// check ip
if (!preg_match('/^217\\.17\\.41\\.5/', $_SERVER['REMOTE_ADDR'])) {
    allpay_error(_PLUG_PAY_ALLPAY_ERROR);
}
// check status
if ($status != 'OK') {
    allpay_error(_PLUG_PAY_ALLPAY_ERROR2);
}
// check that it is our payment
if ($vars['id'] != $this_config['seller_id']) {
Ejemplo n.º 11
0
function epassporte_error($msg)
{
    global $order_id, $invoice;
    global $vars;
    fatal_error(sprintf(_PLUG_PAY_EPASSPORT_ERROR4, $msg, $invoice, '<br />') . "\n" . get_dump($vars));
}
Ejemplo n.º 12
0
function passwordcall_error($msg)
{
    global $txn_id, $invoice;
    global $vars;
    fatal_error(sprintf(_PLUG_PAY_PSWDCALL_FERROR, $txn_id, $invoice, '<br />') . "\n" . get_dump($vars));
}
Ejemplo n.º 13
0
function paycom_error($msg)
{
    global $invoice;
    global $vars;
    fatal_error(sprintf(_PLUG_PAY_PAYCOM_FERROR, $msg, $invoice, '<br\\>') . "\n" . get_dump($vars));
}
Ejemplo n.º 14
0
function verotel_error($msg)
{
    global $order_id, $payment_id, $pnref;
    global $vars;
    fatal_error(sprintf(_PLUG_PAY_VEROTEL_FERROR, $msg, $payment_id, '<br />') . "\n" . get_dump($vars));
}
Ejemplo n.º 15
0
function export()
{
    global $response, $config, $connect;
    include 'export.php';
    $query = "SHOW TABLES;";
    $result = mysql_query($query);
    $tables = array();
    if (mysql_num_rows($result) != 0) {
        while ($row = mysql_fetch_row($result)) {
            $tables[] = $row[0];
        }
    }
    get_dump($connect, $tables);
    $response['export'] = 'dump.sql';
}
Ejemplo n.º 16
0
function securetrading_error($msg)
{
    global $txn_id, $invoice;
    global $vars;
    fatal_error(sprintf(_PLUG_PAY_SECURTRD_FERROR, $msg, $txn_id, $invoice, '<br />') . "\n" . get_dump($vars));
}
Ejemplo n.º 17
0
function vanco_error($msg)
{
    global $order_id, $invoice, $pnref;
    global $vars;
    fatal_error(sprintf('multicards ERROR: %s (Details: PNREF:%s, invoice:%d)%s', $msg, $pnref, $invoice, '<br />') . "\n" . get_dump($vars));
}
Ejemplo n.º 18
0
function globill_error($msg)
{
    global $order_id, $payment_id, $pnref;
    global $vars;
    fatal_error(sprintf(_PLUG_PAY_GLOBILL_FERROR, $msg, $pnref, $payment_id, '<br />') . "\n" . get_dump($vars));
}
Ejemplo n.º 19
0
function luotto_error($msg)
{
    global $txn_id, $pid;
    global $vars;
    fatal_error("Luottokunta ERROR: {$msg} (Details: txn_id:'{$txn_id}', invoice:'{$pid}')<br>\n" . get_dump($vars));
}
Ejemplo n.º 20
0
function probilling_error($msg)
{
    global $order_id, $payment_id, $pnref;
    global $vars;
    fatal_error(sprintf(_PLUG_PAY_PROBILLING_FERROR, $msg, $pnref, $payment_id) . "\n" . get_dump($vars));
}
Ejemplo n.º 21
0
function directone_error($msg)
{
    global $order_id, $payment_id, $pnref;
    global $vars;
    fatal_error(sprintf(_PLUG_PAY_DIRECTONEREM_ERROR, $msg, $pnref, $payment_id, '<br />') . "\n" . get_dump($vars));
}
Ejemplo n.º 22
0
function egold_error($msg)
{
    global $txn_id, $invoice;
    global $vars;
    fatal_error(sprintf(_PLUG_PAY_EGOLD_ERROR, $msg, $vars[PAYMENT_BATCH_NUM], $vars[PAYMENT_ID], '<br />') . "\n" . get_dump($vars));
}
Ejemplo n.º 23
0
function paydotcom_error($msg)
{
    global $txn_id, $invoice;
    global $vars;
    fatal_error("paydotcom ERROR: {$msg} (Details: txn_id:'{$txn_id}', invoice:'{$payment_id}')<br>\n" . get_dump($vars));
}
Ejemplo n.º 24
0
function beanstream_remote_error($msg)
{
    global $order_id, $payment_id, $pnref;
    global $vars;
    fatal_error(sprintf(_PLUG_PAY_BEANSTREAM_REM_ERROR, $msg, $pnref, $payment_id, "<br />", "\n") . get_dump($vars));
}
Ejemplo n.º 25
0
function authorize_error($msg)
{
    global $order_id, $invoice, $pnref;
    global $vars;
    fatal_error(sprintf(_PLUG_PAY_AUTHORIZE_ERROR, $msg, $pnref, $invoice, "<br />", "\n") . get_dump($vars));
}
Ejemplo n.º 26
0
function centipaid_error($msg)
{
    global $order_id, $invoice, $pnref;
    global $vars;
    fatal_error(sprintf(_PLUG_PAY_CENTIP_FERROR, $msg, $pnref, $invoice, '<br />'), "\n" . get_dump($vars));
}
Ejemplo n.º 27
0
function Chronopay_error($msg)
{
    global $order_id, $payment_id, $pnref;
    global $vars;
    fatal_error("Chronopay ERROR: {$msg} (Details: PNREF:'{$pnref}', invoice:'{$payment_id}')<br />\n" . get_dump($vars));
}
Ejemplo n.º 28
0
function multicards_error($msg)
{
    global $order_id, $invoice, $pnref;
    global $vars;
    fatal_error(sprintf(_PLUG_PAY_MULTICARD_ERROR, $msg, $pnref, $invoice, '<br />') . "\n" . get_dump($vars));
}
Ejemplo n.º 29
0
function egspay_error($msg)
{
    global $order_id, $payment_id, $pnref;
    global $vars;
    fatal_error(sprintf(_PLUG_PAY_EGSPAY_ERROR, $msg, $payment_id, '<br />') . "\n" . get_dump($vars));
}
Ejemplo n.º 30
0
function stormpay_error($msg)
{
    global $txn_id, $invoice;
    global $vars;
    fatal_error(sprintf(_PLUG_PAY_STORMPAY_FERROR, $msg, $txn_id, $invoice, '<br />') . "\n" . get_dump($vars));
}