Exemplo n.º 1
0
    }
    mysql_query("UPDATE `uni1_users` SET `lp_points` = `lp_points` + " . $mc_gross * $tex . ", `antimatter` = `antimatter` + '" . $credits . "' WHERE `id` = '" . mysql_escape_string($userId) . "';");
    mysql_query("INSERT INTO `uni1_allopass_log` VALUES ('', '" . mysql_escape_string($userId) . "', '" . mysql_escape_string($code) . "', '" . mysql_escape_string($credits) . "','" . mysql_escape_string($type) . "', '" . mysql_escape_string($transac) . "', '" . mysql_escape_string($pay) . "', '" . mysql_escape_string($realpay) . "', '" . mysql_escape_string($received) . "',  '" . $timer . "', '1');");
    if ($INFO1['ref_id'] != 0) {
        mysql_query("UPDATE `uni1_users` SET `antimatter` = `antimatter` + " . $INFO['amount'] / 100 * 5 . " WHERE `id` = '" . $INFO1['ref_id'] . "';");
        SendSimpleMessage($INFO1['ref_id'], '', TIMESTAMP, 4, 'System', 'Anti Matter Order', 'Referal PayPal payment was successful. <br>' . pretty_number($INFO['amount'] / 100 * 5) . ' anti matter have been credited to your account.');
    }
    SendSimpleMessage(mysql_escape_string($userId), '', $timer, 4, 'System', 'Anti Matter Order', 'Allopass payment was successful. <br>' . pretty_number($credits + $credits / 100 * $text) . ' Anti Matter Units have been credited to your account');
    //Admin Message
    SendSimpleMessage(1, '', $timer, 4, 'System', 'Anti Matter Order', 'Allopass payment was successful. <br>' . pretty_number($credits + $credits / 100 * $text) . ' Anti Matter Units have been credited to ' . $userId . '');
}
//-------------------------- Don't change anything below this! ----------------------------- //
$userId = isset($_GET['user_id']) ? $_GET['user_id'] : null;
$pay = isset($_GET['amount']) ? $_GET['amount'] : null;
$realpay = isset($_GET['paid']) ? $_GET['paid'] : null;
$received = isset($_GET['payout_amount']) ? $_GET['payout_amount'] : null;
$credits = isset($_GET['virtual_amount']) ? $_GET['virtual_amount'] : null;
$type = isset($_GET['type']) ? $_GET['type'] : null;
$transac = isset($_GET['transaction_id']) ? $_POST['transaction_id'] : null;
$code = isset($_GET['code']) ? $_GET['code'] : null;
$timer = time();
$result = false;
if (isset($code)) {
    $result = true;
    _rewardPurchase($userId, $pay, $realpay, $received, $credits, $type, $transac, $code, $timer);
}
if ($result) {
    echo 'OK';
}
//Close Connection
mysql_close();
Exemplo n.º 2
0
    curl_close($ch);
}
// Inspect IPN validation result and act accordingly
// check whether the payment_status is Completed
// check that txn_id has not been previously processed
// check that receiver_email is your PayPal email
// check that payment_amount/payment_currency are correct
// process payment and mark item as paid.
// assign posted variables to local variables
//$item_name = $_POST['item_name'];
//$item_number = $_POST['item_number'];
//$payment_status = $_POST['payment_status'];
//$payment_amount = $_POST['mc_gross'];
//$payment_currency = $_POST['mc_currency'];
//$txn_id = $_POST['txn_id'];
//$receiver_email = $_POST['receiver_email'];
//$payer_email = $_POST['payer_email'];
$userId = isset($_POST['custom']) ? $_POST['custom'] : null;
$currency = isset($_POST['item_number']) ? $_POST['item_number'] : null;
$mc_gross = isset($_POST['mc_gross']) ? $_POST['mc_gross'] : null;
$payment_status = isset($_POST['payment_status']) ? $_POST['payment_status'] : null;
$result = false;
if ($payment_status == 'Completed') {
    $result = true;
    _rewardPurchase($userId, $currency, $mc_gross);
}
if ($result) {
    echo 'OK';
}
//Close Connection
mysql_close();
Exemplo n.º 3
0
}
function floattostring($Numeric, $Pro = 0, $Output = false)
{
    return $Output ? str_replace(",", ".", sprintf("%." . $Pro . "f", $Numeric)) : sprintf("%." . $Pro . "f", $Numeric);
}
function _rewardPurchase($userId, $pay, $realpay, $received, $credits, $type, $transac, $code, $timer)
{
    // Make userid safe to use in query
    $userId = mysql_real_escape_string($userId);
    mysql_query("UPDATE `uni1_users` SET `darkmatter` = `darkmatter` + '" . $credits . "' WHERE `id` = '" . mysql_escape_string($userId) . "';");
    mysql_query("INSERT INTO `uni1_paysafecard_log` VALUES ('', '" . mysql_escape_string($userId) . "',  '" . $timer . "', '" . mysql_escape_string($code) . "', '" . mysql_escape_string($realpay) . "','" . mysql_escape_string($credits) . "', '" . mysql_escape_string($type) . "', '1', '');");
}
//-------------------------- Don't change anything below this! ----------------------------- //
$userId = isset($_POST['user_id']) ? $_POST['user_id'] : null;
$pay = isset($_POST['amount']) ? $_POST['amount'] : null;
$realpay = isset($_POST['paid']) ? $_POST['paid'] : null;
$received = isset($_POST['payout_amount']) ? $_POST['payout_amount'] : null;
$type = isset($_POST['type']) ? $_POST['type'] : null;
$transac = isset($_POST['transaction_id']) ? $_POST['transaction_id'] : null;
$code = isset($_POST['code']) ? $_POST['code'] : null;
$timer = time();
$result = false;
if (isset($code)) {
    $result = true;
    _rewardPurchase(1, $pay, $realpay, $received, 1, $type, $transac, $code, $timer);
}
if ($result) {
    echo 'OK';
}
//Close Connection
mysql_close();
Exemplo n.º 4
0
// check that txn_id has not been previously processed
// check that receiver_email is your PayPal email
// check that payment_amount/payment_currency are correct
// process payment and mark item as paid.
// assign posted variables to local variables
//$item_name = $_POST['item_name'];
//$item_number = $_POST['item_number'];
//$payment_status = $_POST['payment_status'];
//$payment_amount = $_POST['mc_gross'];
//$payment_currency = $_POST['mc_currency'];
//$txn_id = $_POST['txn_id'];
//$receiver_email = $_POST['receiver_email'];
//$payer_email = $_POST['payer_email'];
$userId = isset($_POST['custom']) ? $_POST['custom'] : null;
$explode = explode(',', $userId);
$userId = $explode[0];
$the_id = $explode[1];
$currency = isset($_POST['item_number']) ? $_POST['item_number'] : null;
$mc_gross = isset($_POST['mc_gross']) ? $_POST['mc_gross'] : null;
$payment_status = isset($_POST['payment_status']) ? $_POST['payment_status'] : null;
$txn_id = isset($_POST['txn_id']) ? $_POST['txn_id'] : null;
$result = false;
if ($payment_status == 'Completed') {
    $result = true;
    _rewardPurchase($userId, $currency, $mc_gross, $txn_id, $the_id);
}
if ($result) {
    echo 'OK';
}
//Close Connection
mysql_close();