Пример #1
1
function Process_Transaction($id, $event = "approve", $isonlytest = false, $idfield = 'reference_number')
{
    //approve - declined - rebill
    //refund
    //cancel
    //chargeback
    $trans = getTransactionInfo($id, $isonlytest, $idfield);
    if ($trans == -1) {
        toLog("error", "system", "Process_Transaction Invalid Transaction ID, {$idfield}={$id}, Test={$isonlytest} ", $id);
        return;
    }
    $id = $trans['transactionId'];
    toLog("notify", "system", "Process_Transaction Found Transaction ID, ReferenceId=" . $trans['reference_number'] . ", Test={$isonlytest}, Site ID:" . $trans['cs_ID'] . "  ", $id);
    $password_management_action = NULL;
    $notify_action = NULL;
    if (!strcasecmp($event, "approve")) {
        $password_management_action = "add";
        if (strcasecmp($trans['cs_notify_type'], "both") == 0 || strcasecmp($trans['cs_notify_type'], "approve only") == 0) {
            $notify_action = 1;
        }
    } else {
        if (!strcasecmp($event, "decline")) {
            if (strcasecmp($trans['cs_notify_type'], "both") == 0 || strcasecmp($trans['cs_notify_type'], "decline only") == 0) {
                $notify_action = 1;
            }
        } else {
            if (!strcasecmp($event, "rebill")) {
                if (($trans['cs_notify_event'] & 1) == 1) {
                    $notify_action = 2;
                }
            } else {
                if (!strcasecmp($event, "refund")) {
                    $password_management_action = "delete";
                    if (($trans['cs_notify_event'] & 8) == 8) {
                        $notify_action = 8;
                    }
                } else {
                    if (!strcasecmp($event, "cancellation")) {
                        if (($trans['cs_notify_event'] & 4) == 4) {
                            $notify_action = 4;
                        }
                    } else {
                        if (!strcasecmp($event, "chargeback")) {
                            $password_management_action = "delete";
                            if (($trans['cs_notify_event'] & 16) == 16) {
                                $notify_action = 16;
                            }
                        } else {
                            if (!strcasecmp($event, "revoke")) {
                                $password_management_action = "delete";
                                if (($trans['cs_notify_event'] & 32) == 32) {
                                    $notify_action = 32;
                                }
                            } else {
                                if (!strcasecmp($event, "expiration")) {
                                    $password_management_action = "delete";
                                    if (($trans['cs_notify_event'] & 128) == 128) {
                                        $notify_action = 128;
                                    }
                                } else {
                                    toLog("erroralert", "system", "Process_Transaction FAIL: {$event}", $id);
                                    return 0;
                                }
                            }
                        }
                    }
                }
            }
        }
    }
    $m = isset($trans['cs_notify_retry']) && $trans['cs_notify_retry'] > -1 ? $trans['cs_notify_retry'] : "0";
    $posturl = $trans['cs_notify_url'];
    $done = 0;
    $succ = array("url" => $posturl, "head" => "Post Notification Not Enabled", "body" => "Post Notification Not Enabled");
    toLog("notify", "system", "Process_Transaction PARAMETERS Notify:{$notify_action} Post URL:{$posturl} PassManage:{$password_management_action} Trans:{$id} Event:{$event}", $id);
    if ($notify_action) {
        $postdata = array();
        switch ($notify_action) {
            case 1:
                //approve decline
                $postdata = Process_Transaction_ApproveDecline($trans);
                $posturl = $trans['cs_notify_url'];
                break;
            case 2:
                //rebill
                $postdata = Process_Transaction_Rebill($trans);
                $posturl = $trans['cs_notify_eventurl'];
                break;
            case 8:
                //refund
                $postdata = Process_Transaction_Refund($trans);
                $posturl = $trans['cs_notify_eventurl'];
                break;
            case 4:
                //cancel
                $postdata = Process_Transaction_Cancellation($trans);
                $posturl = $trans['cs_notify_eventurl'];
                break;
            case 16:
                //chargeback
                $postdata = Process_Transaction_Chargeback($trans);
                $posturl = $trans['cs_notify_eventurl'];
                break;
            case 32:
                //revoke
                $postdata = Process_Transaction_Revoke($trans);
                $posturl = $trans['cs_notify_eventurl'];
                break;
            case 128:
                //expiration
                $postdata = Process_Transaction_Expiration($trans);
                $posturl = $trans['cs_notify_eventurl'];
                break;
            default:
                //error
                break;
        }
        if ($trans['td_merchant_fields']) {
            $merchantvars = unserialize($trans['td_merchant_fields']);
            foreach ($merchantvars as $key => $val) {
                if (!isset($postdata[$key])) {
                    $postdata[$key] = $val;
                }
            }
        }
        $postdata['USERNAME'] = $trans['td_username'];
        $postdata['PASSWORD'] = $trans['td_password'];
        $postdata['FIRSTNAME'] = $trans['name'];
        $postdata['LASTNAME'] = $trans['surname'];
        $postdata['PASSWORD'] = $trans['td_password'];
        $postdata['ADDRESS'] = $trans['address'];
        $postdata['COUNTRY'] = $trans['country'];
        $postdata['CITY'] = $trans['city'];
        $postdata['STATE'] = $trans['state'];
        $postdata['ZIPCODE'] = $trans['zipcode'];
        $postdata['PHONENUMBER'] = $trans['phonenumber'];
        $postdata['EMAIL'] = $trans['email'];
        $postdata['TRANSACTIONDATE'] = $trans['transactionDate'];
        $postquery = "";
        foreach ($postdata as $key => $val) {
            $postquery .= ($postquery == "" ? "" : "&") . "{$key}=" . urlencode($val);
        }
        $parseurl = parse_url($posturl);
        $postmet = $parseurl['scheme'];
        $postser = $parseurl['host'];
        $postport = stristr($postmet, "https") !== FALSE ? "443" : "80";
        $postser = (stristr($postmet, "https") !== FALSE ? "ssl://" : "") . $postser;
        $done = 0;
        if ($isonlytest) {
            $postquery .= "&testmode=true";
        }
        //toLog("notify","system","Posting to: $posturl values: $postquery",$id);
        $succ['body'] = http_post2($postser, $postport, $posturl, $postquery);
        $succ['url'] = $posturl;
        $succ['data'] = $postdata;
        //if($succ < 0)
        $done = 1;
        //could not connect to server
        //else
        //	if(stristr($succ['head'],"HTTP/1.1") === FALSE || stristr($succ['head'],"HTTP/1.0") === FALSE || stristr($succ['head'],"HTTP/1.1 200 OK")!==FALSE || stristr($succ['head'],"HTTP/1.0 200 OK")!==FALSE)
        //		$done = 1; //successfully posted data
        //	else
        //		$done = 0; //problem with destination
        if ($done != 1) {
            toLog("notify", "system", "Notify Error: " . $succ['body'] . " {$posturl} with data {$postquery}", $id);
        } else {
            toLog("notify", "system", "Notify Success: " . $succ['body'] . " {$posturl} with data {$postquery}", $id);
        }
    }
    $ret[0] = array("succeeded" => $done, "response" => $succ);
    if ($password_management_action) {
        $ret[1] = post_passwordmgmt($trans, $password_management_action, $id);
    } else {
        toLog("notify", "system", "Notify No Password Management: {$posturl} with data {$postquery}", $id);
    }
    return $ret;
}
Пример #2
0
function sendTransactionEmail($transid, $emailtemplate, $testonly = false)
{
    //exit($transid . " " . $emailtemplate);
    dieLog("SHOULD NOT BE USED!");
    $transactionInfo = getTransactionInfo($transid);
    $data = array();
    switch ($emailtemplate) {
        case "customer_rebill_decline_confirmation":
        case "customer_expire_confirmation":
            $data['site_URL'] = $transactionInfo['cs_URL'];
            $data['process_msg'] = $transactionInfo['td_process_msg'];
            $data['reference_number'] = $transactionInfo['reference_number'];
            $data['full_name'] = $transactionInfo['surname'] . ", " . $transactionInfo['name'];
            $data['customer_email'] = $transactionInfo['email'];
            $data['amount'] = "\$" . formatMoney($transactionInfo['amount'] - $transactionInfo['td_customer_fee']) . " USD";
            $data['customer_fee'] = "\$" . formatMoney($transactionInfo['td_customer_fee']) . " USD";
            $data['final_amount'] = "\$" . formatMoney($transactionInfo['amount']) . " USD";
            $data['transaction_date'] = date("F j, Y", strtotime($transactionInfo['transactionDate']));
            $data['customer_support_email'] = $transactionInfo['cs_support_email'];
            $data['password'] = $transactionInfo['td_password'];
            $data['payment_schedule'] = $transactionInfo['payment_schedule'];
            $data["gateway_select"] = $transactionInfo['gateway_id'];
            $sendto['email'][] = array("email" => $transactionInfo['email']);
            break;
        case "customer_cancel_confirmation":
            $data['site_URL'] = $transactionInfo['cs_URL'];
            $data['reference_number'] = $transactionInfo['reference_number'];
            $data['full_name'] = $transactionInfo['name'] . " " . $transactionInfo['surname'];
            $data['cancel_reference_number'] = $transactionInfo['cancel_refer_num'];
            $data["gateway_select"] = $transactionInfo['gateway_id'];
            $sendto['email'][] = array("email" => $transactionInfo['email'], "copy" => "");
            break;
        case "customer_refund_confirmation":
            $data['site_URL'] = $transactionInfo['cs_URL'];
            $data['reference_number'] = $transactionInfo['reference_number'];
            $data['full_name'] = $transactionInfo['name'] . " " . $transInfo['surname'];
            $data['cancel_reference_number'] = $transactionInfo['cancel_refer_num'];
            $data["gateway_select"] = $transactionInfo['gateway_id'];
            $sendto['email'][] = array("email" => $transactionInfo['email'], "copy" => "");
            $sendto['email'][] = array("email" => $bankInfo['bank_email'], "copy" => "( Bank Copy )");
            break;
    }
    if ($transactionInfo['cd_recieve_order_confirmations']) {
        $sendto['email'][] = array("email" => $transactionInfo['cd_recieve_order_confirmations'], "copy" => "( Merchant Copy )");
    }
    //$sendto['email'][] = array("email" => "*****@*****.**", "copy" => "( Merchant Copy )");
    foreach ($sendto['email'] as $email) {
        $data['email'] = $email['email'];
        if (!$testonly) {
            send_email_template($emailtemplate, $data, $email['copy']);
        }
        // Send Customer Email.
    }
}
Пример #3
0
            }
        }
        $log .= $thisLog . "\n";
    }
}
if ($_FILES['batchfile']['type'] == 'application/vnd.ms-excel') {
    set_time_limit(500);
    //	$CSV = file_get_contents($_FILES['batchfile']['tmp_name']);
    //	$CSV = str_replace("\r", "", $CSV);
    //	$CSV_Info = csv_parse($CSV);
    $CSV_Info = importcsv($_FILES["batchfile"]["tmp_name"], false, ",", 8192);
    $log = "Attempting to update transactions through batch file:\n";
    $success = 0;
    $failed = 0;
    foreach ($CSV_Info as $info) {
        $transactionInfo = getTransactionInfo(quote_smart($info[0]), quote_smart($_GET['test']), 'reference_number', " and t.userId = '{$sessionlogin}'");
        $transactionId = $transactionInfo['transactionId'];
        if ($transactionInfo == -1) {
            $log .= " Could not locate transaction '" . $info[0] . "'\n";
            $failed++;
        } else {
            //(Reference_ID, Shipping Tracking Number, Date Shipped, Estimate Arrival Time, Shipping Company,
            //	Optional Tracking Hyperlink, Extra Info)
            $td_tracking_id = quote_smart($info[1]);
            $td_tracking_link = quote_smart($info[5]);
            $td_tracking_company = quote_smart($info[4]);
            $td_tracking_info = quote_smart($info[6]);
            if (!$td_tracking_id) {
                $td_tracking_id = "No Tracking Number Available";
            }
            $td_tracking_ship_date = "";
Пример #4
0
    $datas = array();
    foreach ($transArray as $key => $data) {
        $datas[] = '"' . $data . '"';
    }
    $csv .= implode(',', $datas) . "\n";
}
foreach ($transArray as $key => $data) {
    $keys[] = '"' . $key . '"';
}
$csv = "\n" . implode(',', $keys) . "\n" . $csv;
echo $csv;
die;
$sql = "\r\nSELECT td.* FROM `cs_transactiondetails` as td \r\nWHERE `td_recur_processed` = 0 AND \r\n`status`= 'A' AND `td_rebillingID` >0 \r\n";
$result = mysql_query($sql) or die(mysql_error());
while ($transInfo = mysql_fetch_assoc($result)) {
    $transInfo = getTransactionInfo($transInfo['transactionId']);
    $salt = md5(time() + rand(0, 2000));
    $ss_billing_type = 'Credit';
    if ($transInfo['checkorcard'] == 'C') {
        $ss_billing_type = 'Check';
    }
    if ($transInfo['cardtype'] == 'Visa') {
        $ss_billing_type = 'Visa';
    } else {
        if ($transInfo['cardtype'] == 'Master') {
            $ss_billing_type = 'Mastercard';
        } else {
            if ($transInfo['checkorcard'] == 'C') {
                $ss_billing_type = 'Check';
            }
        }
Пример #5
0
    if (sizeof($_SESSION['cs_found_transaction_array']) > 1) {
        if ($_REQUEST['selecttd'] && in_array($_REQUEST['selecttd'], $_SESSION['cs_found_transaction_array'])) {
            $reference_number = $_REQUEST['selecttd'];
            $_SESSION['cs_found_transaction_array'] = NULL;
        } else {
            $cs_live_tree['lt_question_text'] = 'I found multiple transactions from your info. Please tell me which date/referenceID/description your purchase was for.';
            $options = NULL;
            $actionurl = "livetree.php?lt_ID=" . $cs_live_tree['lt_ID'];
            foreach ($_SESSION['cs_found_transaction_array'] as $tid) {
                $options[] = array('url' => $actionurl . "&selecttd=" . $tid['reference_number'], 'title' => $tid['title'], 'descr' => $tid['descr']);
            }
        }
    }
}
if ($reference_number) {
    $transactionInfo = getTransactionInfo($reference_number, false, 'reference_number');
    if ($transactionInfo != -1) {
        if ($_REQUEST['branchonsuccess_id']) {
            $lt_ID = intval($_REQUEST['branchonsuccess_id']);
        }
        $sql = "select lt.*,plt.lt_subject as parent_lt_subject from cs_live_tree as lt left join cs_live_tree as plt on lt.lt_parent_ID = plt.lt_ID where lt.lt_ID = '{$lt_ID}' {$sql_lt_type};";
        $result = mysql_query($sql) or dieLog(mysql_error());
        $cs_live_tree = mysql_fetch_assoc($result);
    } else {
        $_SESSION['cs_found_reference_number'] = NULL;
        $cs_error_msg = "Transaction could not be found. Please try another search method.<BR>If you have tried all methods, please select 'Could Not Find Transaction' option.";
    }
}
if ($cs_live_tree['lt_action'] == 'refund') {
    if ($_REQUEST['refundtd'] && $_REQUEST['refundtd'] == $reference_number) {
        $refund_type = "Customer Service Refund";
Пример #6
0
</strong></font></td></tr>
<?php 
    $totamount = 0;
    $pending = 0;
    $pendingAmt = 0;
    $approved = 0;
    $approvedAmt = 0;
    $declined = 0;
    $declinedAmt = 0;
    $creditcard = 0;
    $cheque = 0;
    $chequeAmt = 0;
    $creditcardAmt = 0;
    $i = 0;
    while ($show_select_val = mysql_fetch_assoc($show_select_sql)) {
        $transactionInfo = getTransactionInfo($show_select_val['transactionId'], $display_test_transactions);
        $sql = "SELECT service_notes,customer_notes FROM `cs_callnotes` WHERE `transaction_id` ='" . $show_select_val['transactionId'] . "' AND cn_type='refundrequest'";
        $result = mysql_query($sql);
        if (mysql_num_rows($result) > 0) {
            $refundNoteArray = mysql_fetch_assoc($result);
            $refundReason = $refundNoteArray['customer_notes'];
            $refundNote = $refundNoteArray['service_notes'];
            $refundrequest = 1;
        } else {
            $refundrequest = 0;
        }
        $is_chargeback = $show_select_val['td_is_chargeback'];
        $amount = $show_select_val['amount'];
        $totamount = $totamount + $show_select_val['amount'];
        //		$strPassStatus = $show_select_val['td_is_chargeback'];
        $strPendingStatus = $show_select_val['status'];
Пример #7
0
        </select>
        <input type="hidden" name="gateway_id" value="<?php 
        echo $_REQUEST['gateway_id'];
        ?>
" />
        <input type="hidden" name="tickets_reference" value="<?php 
        echo $row['tickets_reference'];
        ?>
" />      </td>
    </tr>
	<tr>
	  <td bgcolor="#DDDDDD" colspan="2" style="text-align:center; font-size:10px;"> - Transaction Info - </td>
	</tr>
	    <?php 
        if ($row['td_transactionId']) {
            $transactionInfo = getTransactionInfo($row['td_transactionId'], false, 'reference_number');
        }
        ?>
    <tr>
      <td bgcolor="#EEEEEE" class="boxborder text"><b>Transaction:</b></td>
      <td class="boxborder text">
	  
	  <select name="td_transactionId" id="td_transactionId" onchange="document.getElementById('transInfoID').style.visibility=(this.value?'visible':'hidden');document.getElementById('InfoLink').href='https://www.etelegate.com/admin/viewTransaction.php?ref='+this.value;" >
		  <?php 
        //if ($transactionInfo['reference_number']) {
        ?>
		  <?php 
        //} else {
        ?>
          <option value="">None</option>
		  <?php 
Пример #8
0
    <td width="100%" valign="top" align="center"><form name="view" action="updatereportpage.php" method="post" onsubmit="return cancelvalidation()">
        <input type="hidden" name="id" value="<?php 
echo $id;
?>
">
        </input>
        <?php 
$by = 'transactionId';
if (!$id && !$reference_number) {
    doTable("Transaction Invalid", "Error", NULL, true, true, true);
    die;
}
if (!$id && $reference_number) {
    $transactionInfo = getTransactionInfo($reference_number, $display_test_transactions, 'reference_number');
} else {
    $transactionInfo = getTransactionInfo($id, $display_test_transactions);
}
if (!is_array($transactionInfo)) {
    doTable("Transaction Not Found", "Error", NULL, true, true, true);
    die;
}
$activity = UserActivity($transactionInfo);
if ($activity == "ACT") {
    $act = "User Account is Active (Active).";
} else {
    if ($activity == "UNF") {
        $act = "User Account Not Found (Inactive).";
    } else {
        if ($activity == "PNF") {
            $act = "Password Incorrect (Inactive).";
        } else {
Пример #9
0
    $_REQUEST['lang'] = $langdefault;
}
if (!isset($_GET['action'])) {
    $_GET['action'] = 'Login';
}
if (!isset($_GET['issue'])) {
    if (!isset($_POST['issue'])) {
        $issue = 0;
    } else {
        $issue = $_POST['issue'];
    }
} else {
    $issue = $_GET['issue'];
}
$transactionId = $_SESSION['cs_found_reference_number'];
$transactionInfo = getTransactionInfo($transactionId, false, "reference_number", "");
include_once 'language/' . $_REQUEST['lang'] . '.php';
include_once 'header.php';
updateUserInfo();
#############################################################################################
####################### AUTH LOGIN AND LOGOUT SYSTEM REQUIRES SESSIONS ######################
#############################################################################################
// LOGOUT
if (isset($_GET['action']) && $_GET['action'] == 'Logout') {
    unset($_SESSION['stu_username']);
    unset($_SESSION['stu_password']);
    $_GET['action'] = 'Login';
}
// WHAT TO DO if NO USERNAME OR PASSWORD IS SET
if (!isset($_SESSION['stu_username']) && !isset($_SESSION['stu_password'])) {
    ?>
Пример #10
0
$strBillDate = "";
$i_gateway_id = -1;
$canceldate = func_get_current_date_time();
$cancel = isset($HTTP_POST_VARS['cancel']) ? quote_smart($HTTP_POST_VARS['cancel']) : "";
$refund = isset($HTTP_POST_VARS['refund']) ? quote_smart($HTTP_POST_VARS['refund']) : "";
$trans_id = isset($HTTP_POST_VARS['tid']) ? quote_smart($HTTP_POST_VARS['tid']) : "";
$reference_number = isset($HTTP_POST_VARS['reference_number']) ? quote_smart($HTTP_POST_VARS['reference_number']) : "";
$user_id = isset($HTTP_POST_VARS['user_id']) ? quote_smart($HTTP_POST_VARS['user_id']) : "";
$crorcq1 = isset($HTTP_POST_VARS['crorcq1']) ? quote_smart($HTTP_POST_VARS['crorcq1']) : "";
$str_bill_date = isset($HTTP_POST_VARS['billDate']) ? quote_smart($HTTP_POST_VARS['billDate']) : "";
$note_id = isset($HTTP_POST_VARS['note_id']) ? quote_smart($HTTP_POST_VARS['note_id']) : "";
$msgtodisplay = "";
if ($trans_id != "") {
    $ref_no = func_Trans_Ref_No($trans_id);
    $table = "`cs_transactiondetails` as t ";
    $show_select_val = getTransactionInfo($trans_id, false);
    if ($refund != "") {
        $etel_debug_mode = 0;
        $msg = exec_refund_request($trans_id, "Customer Service Refund", "{$cancelreason}:{$cancelreasonother}");
        $msgtodisplay = "<table width='370' height='100' align='center' valign='top' style='border:2px solid black'><tr><td align='center' valign='middle'><font face='verdana' size='2' color='red'>{$msg}. Callback through '{$contactmethod}'.<br></font></td></tr><tr><td align='center'><a href='startpage.php'><img border='0' src='../images/back.gif'></a></td></tr></table>";
    } else {
        if ($cancel != "") {
            $cancelreason = isset($HTTP_POST_VARS['selectReason']) ? quote_smart($HTTP_POST_VARS['selectReason']) : "";
            $cancelreasonother = isset($HTTP_POST_VARS['txtNotes']) ? quote_smart($HTTP_POST_VARS['txtNotes']) : "";
            //$str_is_cancelled = func_get_value_of_field($cnn_cs,"cs_transactiondetails","cancelstatus","transactionId",$return_insertId);
            if ($show_select_val['td_enable_rebill'] == "0") {
                $msgtodisplay = "<table width='370' height='100' align='center' valign='top' style='border:2px solid black'><tr><td align='center' valign='middle'><font face='verdana' size='2' color='red'>This transaction/subscription has been already canceled.<br>You will no longer be rebilled for this subscription.</font></td></tr><tr><td align='center'><a href='startpage.php'><img border='0' src='../images/back.gif'></a></td></tr></table>";
            } else {
                $strCurrentDateTime = func_get_current_date();
                $str_approval_status = $show_select_val['status'];
                if ($strCurrentDateTime >= $str_bill_date && $str_approval_status == "A") {
Пример #11
0
require_once "includes/dbconnection.php";
include 'includes/header.php';
include 'includes/function2.php';
require_once 'includes/function.php';
$headerInclude = "reports";
include "includes/topheader.php";
$sessionlogin = $companyInfo['userId'];
$transactionId = intval($_REQUEST['id']);
$ref = quote_smart($_REQUEST['ref']);
$id = $transactionId;
$field = 'transactionId';
if ($ref) {
    $id = $ref;
    $field = 'reference_number';
}
$transactionInfo = getTransactionInfo($id, quote_smart(intval($_GET['test'])), $field, " and t.userId = '{$sessionlogin}'");
if ($transactionInfo == -1) {
    dieLog("Invalid Transaction Found! ID={$id} FIELD={$field} userId={$sessionlogin} Testmode=" . $_GET['test'] . " _SERVER=" . serialize($_SERVER), "Transaction Not Found!");
}
//Update Shipping
if ($_POST['Update']) {
    $td_tracking_id = quote_smart($_POST['td_tracking_id']);
    $td_tracking_link = quote_smart($_POST['td_tracking_link']);
    $td_tracking_company = quote_smart($_POST['td_tracking_company']);
    $td_tracking_info = quote_smart($_POST['td_tracking_info']);
    $td_tracking_order_id = quote_smart($_POST['td_tracking_order_id']);
    $td_tracking_id_disable = quote_smart($_POST['td_tracking_id_disable']);
    if ($td_tracking_id_disable) {
        $td_tracking_id = "No Tracking Number Available";
    }
    $tracking_ship_date_timestamp = strtotime(quote_smart($_POST['td_tracking_ship_date']));
Пример #12
0
// Package:         Zerone-Consulting
// Description:     Online Payment Gateway
// Files:           index.php,home.php,cheque.php,creditcard.php,report.php,reportBottom.php, reportBottomSummary.php,companyEdit.php
//    				config.php,useraccount.php,viewCompany.php,topheader.php,ViewreportPage.php,addcheque.php,blank.php,profile_blank.php
//					VT_blank.php,creditcardfb.php,customerservice_blank.php,report_custom.php,callback.php,ledger.php
//viewreportpage.php:	The client page functions for viewing the company transaction details.
include 'includes/sessioncheck.php';
require_once "includes/dbconnection.php";
include 'includes/header.php';
include 'includes/function2.php';
require_once 'includes/function.php';
$headerInclude = "reports";
include "includes/topheader.php";
$sessionlogin = isset($HTTP_SESSION_VARS["sessionlogin"]) ? $HTTP_SESSION_VARS["sessionlogin"] : "";
$transactionId = $_GET['id'];
$transactionInfo = getTransactionInfo($transactionId);
?>
<style>
.tdbdr{border-bottom:1px solid black;}
.tdbdr1{border-bottom:1px solid black;border-right:1px solid black;}
.tdbdr2{border-right:1px solid black;}
</style>
 <table border="0" cellpadding="0" width="800" cellspacing="0" align="center">
  <tr>
    <td width="100%" valign="top" align="center">
<form name="view" action="viewreportpage.php" method="get">
<br>
    	<table border="0" cellspacing="0" cellpadding="0">
		<tr>
		<td height="22" align="left" valign="top" width="1%" background="images/menucenterbg.gif" nowrap><img border="0" src="images/menutopleft.gif" width="8" height="22"></td>
		    <td height="22" align="center" valign="middle" width="50%" background="images/menucenterbg.gif" ><span class="whitehd">Credit&nbsp;
Пример #13
0
		  		  <option value="">All Banks</option>
				<?php 
func_fill_combo_conditionally("Select * from cs_bank", $bank_id, $cnn_cs);
?>
				</select>
		  		<input type="image" id="viewcompany" SRC="<?php 
echo $tmpl_dir;
?>
/images/submit.jpg" width="49" height="20">
		 	 </td>
		  </tr>

          <?php 
for ($i = 1; $i <= $numrows; $i++) {
    $value = mysql_fetch_assoc($result);
    $transInfo = getTransactionInfo($value['transactionId']);
    //$qry_company="select companyname ,processing_currency from cs_companydetails where userId =$value[5]";
    //$company_res= mysql_query($qry_company);
    //$company_row=mysql_fetch_row($company_res);
    //$qry_select_details="select a.companyname, a.processing_currency,b.reference_number from cs_companydetails as a,cs_transactiondetails as b where a.userId=$userid and b.transactionId=$value[6]";
    //$company_res= mysql_query($qry_select_details);
    //$details_row=mysql_fetch_row($company_res);
    //$refnum=$details_row[2];
    /*$qry_ref_no="select reference_number from cs_transactiondetails where transactionId=$value[6]";
    		$refno_res= mysql_query($qry_ref_no);
    		$ref_row=mysql_fetch_row($refno_res);
    		*/
    //print "<tr><td  width='7%' class='cl1'>$value[0] &nbsp;</td></tr>";
    //print "<tr><td  width='7%' class='cl1'>$value[1] &nbsp;</td></tr>";
    //print "<tr><td  width='7%' class='cl1'>$value[2] &nbsp;</td></tr>";
    $totalrecur += floatval($transInfo['subAcc']['recur_charge']);
Пример #14
0
<?php

$etel_debug_mode = 1;
require_once "includes/integration.php";
require_once "includes/dbconnection.php";
function Get_Bank_Information($bank_name)
{
    $qry_company = "SELECT * FROM cs_bank WHERE bank_name = '{$bank_name}';";
    $bank_details = sql_query_read($qry_company) or dieLog("Cannot execute query");
    return mysql_fetch_assoc($bank_details);
}
$bankInfo = Get_Bank_Information("BankAN30 (Checks)");
$transInfo = getTransactionInfo("ND46691PF", false, "reference_number");
$processor = new AmeriNet_Client($bankInfo);
echo "<pre>";
print_r($processor->ExecutePeekUserExists("ND46691PF"));
print_r($r = ch_AmeriNet_integration($transInfo, $bankInfo, NULL));
echo "</pre>";
Пример #15
0
$sql = $_GET['sql'];
set_time_limit(0);
$sql = "SELECT td.* FROM `cs_transactiondetails` as td left join cs_companydetails as cd on td.userId = cd.userId \nWHERE activeuser = 1 and `td_recur_attempts` < {$attempts_max} AND `td_recur_processed` = 0 AND \n`status`= 'A' AND `td_rebillingID` <> -1 AND `cancelstatus` = 'N' AND `td_is_chargeback` = '0'\nAND `td_recur_next_date`<=CURDATE() {$sql} order by td_recur_attempts asc limit 100";
if ($sql) {
    echo $sql;
}
$transactions = mysql_query($sql, $cnn_cs) or dieLog(mysql_errno() . ": " . mysql_error() . "<br>Cannot execute query");
$num = mysql_num_rows($transactions);
$output = "Running a search for all recurring transactions to be billed today...\n\r";
$output .= "Found {$num} Transactions to be rebilled.\n\r";
toLog('rebill', 'system', $output, -1);
while ($transaction = mysql_fetch_assoc($transactions)) {
    // Grab transaction info.
    $oldTransId = $transaction['transactionId'];
    $newTransId = NULL;
    $transactionInfo = getTransactionInfo($oldTransId);
    $suboutput = "";
    $suboutput .= "-----------------------\n\r";
    $suboutput .= "Found Transaction ID '" . $transactionInfo['reference_number'] . "'.\n\r";
    if ($transactionInfo['td_recur_processed'] || $transactionInfo['cancelstatus'] != 'N' || $transactionInfo['td_is_chargeback'] || $transactionInfo['chargeAmount'] < 3.95) {
        $suboutput .= "Transaction Cannot be Processed. Ignoring this Transaction. Charge=" . $transactionInfo['chargeAmount'] . "\n\r";
        $sql = "UPDATE `cs_transactiondetails` SET `td_enable_rebill` = '0', `td_recur_processed` = '1' WHERE `transactionId` = '{$oldTransId}' LIMIT 1";
        if (!$testonly) {
            $result = mysql_query($sql, $cnn_cs) or dieLog(mysql_errno() . ": " . mysql_error() . "<br>Cannot execute query");
        }
        //toLog('erroralert','customer',"Shouldn't happen: ".$suboutput);
    } else {
        if (!$transactionInfo['td_enable_rebill']) {
            $suboutput .= "Transaction has expired on '" . $transactionInfo['td_recur_next_date'] . "'\n\r";
            $sql = "UPDATE `cs_transactiondetails` SET `td_recur_processed` = '1' WHERE `transactionId` = '{$oldTransId}' LIMIT 1";
            if (!$testonly) {