示例#1
0
function process_payment()
{
    // response fields indicating status of transaction
    $approval_code = $_POST["approval_code"];
    $status = $_POST["status"];
    $oid = $_POST["oid"];
    $ttime = $_POST["ttime"];
    // our fields
    $chargetotal = (double) $_POST["chargetotal"];
    $userid = $_POST["userid"];
    $itemid = $_POST["itemid"];
    $x_payment = urldecode($_POST["x_payment"]);
    $x_addr = urldecode($_POST["x_addr"]);
    $x_aprcode = $_POST["x_aprcode"];
    $x_ccshort = $_POST["x_ccshort"];
    if (!isset($x_ccshort)) {
        $x_ccshort = "";
    }
    $x_desc = store_GetItemDesc($itemid);
    // get cvv/avs codes from approval code
    $check_code = get_result_from_code($x_aprcode);
    if (!check_avs_code($check_code)) {
        echo "<strong>Please note that credit card address was not verified</strong><br>";
    }
    echo "Thank you for placing your order !<br><br>";
    echo "Your Receipt<br><br>";
    //	UserID:	$userid <br>
    echo "\n\t<br>\n\tOrder Number:  {$oid}<br>\n\tTime:   {$ttime} <br>\n\t{$x_desc} <br>\n\tPayment Method - {$x_payment}<br><br>\n\tBilling Address<br>\n\t{$x_addr}";
    echo "<br>\n\tItem:       {$x_desc}<br>\n\tPrice:      \${$chargetotal}<br>\n\tTaxes:\t    \$0.00<br>\n\tTotal:      \${$chargetotal}<br>\n\t<br>\n\t<br>";
    //	echo "Transaction details<br>";
    //	echo "Status: '$status'<br>";
    //	echo "ACode1: '$approval_code'<br>";
    //	echo "ACode2: '$x_aprcode'<br>";
    require_once 'dbinfo.inc.php';
    // create & execute query
    $tsql = "EXECUTE ECLIPSE_PROCESSTRANSACTION ?, ?, ?, ?, ?, ?, ?, ?";
    $params = array($x_ccshort . " " . $oid, $userid, $ttime, $chargetotal, $x_aprcode, $status, $itemid, 'SJFei937cjsjf029sdkWccYY9');
    $member = db_exec($conn, $tsql, $params);
    // matomy
    require_once 'matomy.inc.php';
    $geoIpCode = matomy_get_geoIpCode();
    matomy_do_conversion($conn, $userid, $geoIpCode, $itemid, $chargetotal, $oid);
    // send confirmation email
    $email = urldecode($_POST["x_email"]);
    send_payment_email($email, $oid, $ttime, $x_payment, $x_addr, $x_desc, $chargetotal, true);
    return;
}
示例#2
0
    $pricePaid = $_REQUEST['paid'];
    $pricePaid = $pricePaid / 100.0;
    $priceNet = $_REQUEST['reference-receivable-net'];
    $priceNet = $priceNet / 100.0;
    $mobileNum = $_REQUEST['encoded-mobile'];
    $mobileNum = urldecode($mobileNum);
    dump_sms_log("billingresult OK {$CustomerID}:{$itemCode}:{$email}:{$priceNet}:{$trxid}:{$mobileNum}");
    // create & execute query
    $tsql = "EXECUTE ECLIPSE_PROCESSTRANSACTION ?, ?, ?, ?, ?, ?, ?, ?";
    $params = array($trxid, $CustomerID, $ttime, $priceNet, "SMS:{$pricePaid}{$currency}:{$mobileNum}", "APPROVED", $itemCode, 'SJFei937cjsjf029sdkWccYY9');
    $member = db_exec($conn, $tsql, $params);
    // notify matomy about transaction
    require_once 'matomy.inc.php';
    matomy_do_conversion($conn, $CustomerID, $geoIpCode, $itemCode, $priceNet, $trxid);
    // send confirmation email with $show_success_msg=false
    $x_desc = store_GetItemDesc($itemCode);
    send_payment_email($email, $trxid, $ttime, "SMS", "{$mobileNum}", $x_desc, "{$currency} {$pricePaid}", false);
}
//
// ACK boku
//
send_boku_ack(0, "OK");
exit;
function dump_sms_log($msg)
{
    global $conn;
    // create & execute query
    $tsql = "insert into DBG_SMSCallbacks (data) values (?)";
    $params = array($msg);
    $member = db_exec($conn, $tsql, $params);
}
示例#3
0
        if (substr($resp, 0, 3) == "SMS") {
            $method = "SMS";
        } else {
            if (substr($resp, 0, 5) == "STEAM") {
                $method = "STEAM";
            } else {
                if (substr($resp, 0, 3) == "G1C") {
                    $method = "G1 CREDITS";
                    $History_Price[$i] = g1c_USDtoG1C($History_Price[$i]);
                }
            }
        }
    }
    $History_Method[$i] = $method;
    // item desc
    $desc = store_GetItemDesc($member['ItemID']);
    $History_Details[$i] = $desc;
    $i++;
}
?>

<?php 
function show_history_row($hDate, $hMethod, $hPrice, $hDetails, $hBG)
{
    if ($hBG == "1") {
        $hBGClass = "tr_1";
    } else {
        $hBGClass = "tr_2";
    }
    $hDateStr = date_format($hDate, "M d, Y H:i");
    $curenc1 = $hMethod == "G1 CREDITS" ? "" : "\$";