コード例 #1
0
ファイル: Store_CC.php プロジェクト: Mateuus/website
function show_item_row3($itemid, $itemInfo1, $itemInfo2, $itemInfo3)
{
    // get item price and desc
    list($x_price, $Item_Desc) = store_GetItemPriceDescByCode($itemid, 0);
    global $CustomerID;
    echo "\n\t\t\t<a href=\"Store_Checkout.php?ItemID={$itemid}\" class=\"bg_select_amount\">\n\t\t\t\t\n\t\t\t\t<span class=\"number_1\" style=\"font-size: 24px; margin-left: 20px;\">{$itemInfo1}</span>\t\t\t\t\t\t\t\n\t\t\t\t<span class=\"name_1\" style=\"font-size: 16px;\">{$itemInfo2}</span>\n\t\t\t\t<span class=\"name_2\" style=\"font-size: 16px;\">{$itemInfo3}</span>\n\t\t\t\t<span class=\"line_ind8\" style=\"font-size: 16px;margin-top: 4px;\" ></span>\n\t\t\t\t<span class=\"price\">\$ {$x_price}</span>\n\t\t\t</a>\n\t\t\t";
}
コード例 #2
0
ファイル: Store_SMS.php プロジェクト: Mateuus/website
function show_item_row($itemid)
{
    global $CustomerID;
    global $GeoCountry;
    // get item price and desc
    list($x_price, $Item_Desc) = store_GetItemPriceDescByCode($itemid, 2);
    // get item price from boku
    $url = "&row-ref={$x_price}";
    $url .= "&country={$GeoCountry}";
    $xml = exec_boku_call("service-prices", $url);
    $attr = $xml["service"]["key-value"]["pricing"]["@attributes"];
    if (!isset($attr["amount"])) {
        echo "<p class=\"name\">{$Item_Desc} is not available in your country ({$GeoCountry})</p>";
        echo "<br>";
        return;
    }
    $price = $attr["amount"] / 100.0;
    $currency = $attr["currency"];
    $cdp = $attr["currency-decimal-places"];
    // format with correct decimal places
    $fmt = "%.{$cdp}" . "f";
    $price2 = sprintf($fmt, $price);
    echo "<a target=\"_blank\" href=\"smsstartpay.php?ItemID={$itemid}\">";
    echo "Click To buy {$Item_Desc} for \${$price2} {$currency}";
    echo "</a>";
    echo "<br>";
}
コード例 #3
0
ファイル: ccpost2.php プロジェクト: Mateuus/website
function main_make_purchase()
{
    global $conn;
    require_once 'cccountries.inc.php';
    if (!cc_is_country_allowed()) {
        die("country not allowed for credit card use");
    }
    $itemid = getParam('itemid');
    list($chargetotal, $x_desc) = store_GetItemPriceDescByCode($itemid, 0);
    // avoid reloading of this page
    if (!isset($_SESSION['CCPurchaseInProcess'])) {
        echo "<strong>Please do not reload this page</strong>";
        return;
    }
    unset($_SESSION['CCPurchaseInProcess']);
    //
    // check if user can make transaction
    //
    // create & execute query
    $tsql = "EXECUTE ECLIPSE_PROCESSTRANSACTION_CHECK ?, ?";
    $params = array($userid, 0);
    $member = db_exec($conn, $tsql, $params);
    if ($member['Blocked'] > 0) {
        die("fraud");
    }
    echo "Processing transaction.<br><br><br>";
    //do not press any keys or back button to avoid double charges....
    $ans = issue_transaction($chargetotal);
    // check result and display errors (if any)
    if (!check_transaction_answer($ans)) {
        return;
    }
    // at this time we have successful transaction
    echo "<strong>Thank you for placing your order !</strong><br><br>";
    echo "Your Receipt<br>";
    $userid = getParam('userid');
    $bname = getParam('bname');
    $baddr1 = getParam('baddr1');
    $bcity = getParam('bcity');
    $bzip = getParam('bzip');
    $bstate = getParam('bstate');
    $bcountry = getParam('bcountry');
    if ($bcountry != "US") {
        $bstate = "";
    }
    $cctype = getParam('cctype');
    $cardnumber = getParam('cardnumber');
    $expmonth = getParam('expmonth');
    $expyear = getParam('expyear');
    $ccn1 = substr($cardnumber, -4, 4);
    $x_payment = "{$cctype} ending in {$ccn1}<br>Expires {$expmonth}/{$expyear}";
    $x_addr = "{$bname} ({$userid})<br>{$baddr1}<br>{$bcity}<br>{$bstate} {$bzip}<br>{$bcountry}<br>";
    $x_email = getParam('x_email');
    echo "<br>\n\tOrder Number:  {$ans->OrderId}<br>\n\tTime:   {$ans->TransactionTime} <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>";
    // send confirmation email
    $email = urldecode($_POST["x_email"]);
    send_payment_email($email, $ans->OrderId, $ans->TransactionTime, $x_payment, $x_addr, $x_desc, $chargetotal, true);
}
コード例 #4
0
ファイル: store_g1c.php プロジェクト: Mateuus/website
function show_item_row2($itemid, $itemInfo1, $itemInfo2, $itemInfo3)
{
    // get item price and desc
    list($x_price, $Item_Desc) = store_GetItemPriceDescByCode($itemid, 3);
    global $CustomerID;
    $g1cost = g1c_GCtoG1C($x_price);
    echo "\n\t\t\t<a href=\"Store_g1c_confirm.php?ItemID={$itemid}\" class=\"bg_select_amount\">\n\t\t\t\t<span class=\"img_2\"></span>\n\t\t\t\t<span class=\"number_1\">{$itemInfo1}</span>\n\t\t\t\t<span class=\"cL\"></span>\n\t\t\t\t<span class=\"line_ind8\"></span>\n\t\t\t\t<span class=\"name_1\">{$itemInfo2}</span>\n\t\t\t\t<span class=\"name_2\">{$itemInfo3}</span>\n\t\t\t\t<span class=\"line_ind8\"></span>\n\t\t\t\t<span class=\"price\">{$g1cost} G1C</span>\n\t\t\t</a>\n\t\t\t";
}
コード例 #5
0
ファイル: store_g1c_Confirm.php プロジェクト: Mateuus/website
<?php

session_start();
require_once 'https_redir.php';
require_once 'auth.php';
require_once 'store.inc.php';
require_once 'store_g1c.inc.php';
if (!isset($_SESSION['GamersfirstID'])) {
    die('fraud');
}
$CustomerID = $_SESSION['CustomerID'];
// get item price and desc
$x_id = $_REQUEST['ItemID'];
list($x_price, $Item_Desc) = store_GetItemPriceDescByCode($x_id, 3);
$g1Cost = g1c_GCtoG1C($x_price);
$g1Balance = g1c_GetBalance($x_price);
$g1Token = "";
if ($g1Cost > $g1Balance) {
    $g1Token = g1c_GenerateToken("http://www.gamersfirst.com/marketplace/get_g1c.php");
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>War Inc. Battlezone - Store</title>
<link rel="stylesheet" type="text/css" href="style.css" />
<!--[if IE]>
<link href="style_ie.css" rel="stylesheet" type="text/css">
<![endif]-->
<script type="text/javascript" src="js/analytics.js"></script>
コード例 #6
0
ファイル: ccpost.php プロジェクト: Mateuus/website
require_once 'ccshop.inc.php';
require_once 'Store.inc.php';
require_once 'cccountries.inc.php';
if (!cc_is_country_allowed()) {
    die("country not allowed for credit card use");
}
$chargetotal = 1.99;
$userid = $_POST['userid'];
$itemid = $_POST['itemid'];
if (!isset($userid)) {
    die("fraud1");
}
if (!isset($itemid)) {
    die("fraud2");
}
list($chargetotal, $Item_Desc) = store_GetItemPriceDescByCode($itemid, 0);
//
// check if user can make transaction
//
require_once 'dbinfo.inc.php';
// create & execute query
$tsql = "EXECUTE ECLIPSE_PROCESSTRANSACTION_CHECK ?, ?";
$params = array($userid, 0);
$member = db_exec($conn, $tsql, $params);
if ($member['Blocked'] > 0) {
    die("fraud");
}
$bname = $_POST['bname'];
$baddr1 = $_POST['baddr1'];
$bcity = $_POST['bcity'];
$bzip = $_POST['bzip'];
コード例 #7
0
ファイル: smsstartpay.php プロジェクト: Mateuus/website
<?php

session_start();
require_once 'auth.php';
require_once 'Store.inc.php';
// get
$CustomerID = $_SESSION['CustomerID'];
$itemCode = $_REQUEST['ItemID'];
if (!isset($CustomerID)) {
    die('2');
}
if (!isset($itemCode)) {
    die('3');
}
// price & description
list($itemPrice, $itemName) = store_GetItemPriceDescByCode($itemCode, 2);
if ($itemPrice < 0) {
    die('itemprice');
}
// get customer email
require_once 'dbinfo.inc.php';
$tsql = "SELECT * FROM AccountInfo WHERE CustomerID=?";
$params = array($CustomerID);
$member = db_exec($conn, $tsql, $params);
$CustomerEmail = trim($member['email']);
// get country geo-ip code
require_once 'matomy.inc.php';
$geoIpCode = matomy_get_geoIpCode();
// assemble pass-thru param
$param = "{$CustomerID}:{$itemCode}:{$itemPrice}:{$CustomerEmail}:{$geoIpCode}";
//