コード例 #1
0
ファイル: validate.php プロジェクト: Nozlaf/WeBid
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version. Although none of the code may be
 *   sold. If you have been sold this script, get a refund.
 ***************************************************************************/
include 'common.php';
if (isset($_GET['fail']) || isset($_GET['completed'])) {
    $template->assign_vars(array('TITLE_MESSAGE' => isset($_GET['fail']) ? $MSG['425'] : $MSG['423'], 'BODY_MESSAGE' => isset($_GET['fail']) ? $MSG['426'] : $MSG['424']));
    include 'header.php';
    $template->set_filenames(array('body' => 'message.tpl'));
    $template->display('body');
    include 'footer.php';
    exit;
}
$fees = new fees();
$fees->data = $_POST;
if (isset($_GET['paypal'])) {
    $fees->paypal_validate();
}
if (isset($_GET['authnet'])) {
    $fees->authnet_validate();
}
if (isset($_GET['worldpay'])) {
    $fees->worldpay_validate();
}
if (isset($_GET['moneybookers'])) {
    $fees->moneybookers_validate();
}
if (isset($_GET['toocheckout'])) {
    $fees->toocheckout_validate();
コード例 #2
0
ファイル: pay.php プロジェクト: alenteria/WeBid
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version. Although none of the code may be
 *   sold. If you have been sold this script, get a refund.
 ***************************************************************************/
include 'common.php';
// If user is not logged in redirect to login page
if (!$user->is_logged_in() && $_GET['a'] != 3) {
    header('location: user_login.php');
    exit;
}
$query = "SELECT * FROM " . $DBPrefix . "gateways LIMIT 1";
$db->direct_query($query);
$gateway_data = $db->result();
$fees = new fees();
switch ($_GET['a']) {
    case 1:
        // add to account balance
        $pp_paytoemail = $gateway_data['paypal_address'];
        $an_paytoid = $gateway_data['authnet_address'];
        $an_paytopass = $gateway_data['authnet_password'];
        $wp_paytoid = $gateway_data['worldpay_id'];
        $tc_paytoid = $gateway_data['toocheckout_id'];
        $mb_paytoemail = $gateway_data['moneybookers_address'];
        $payvalue = $system->input_money($_POST['pfval']);
        $custoncode = $user->user_data['id'] . 'WEBID1';
        $message = sprintf($MSG['582'], $system->print_money($payvalue));
        $title = $system->SETTINGS['sitename'] . ' - ' . $MSG['935'];
        $fees->add_to_account($MSG['935'], 'balance', $payvalue);
        break;
コード例 #3
0
ファイル: pay.php プロジェクト: Nozlaf/WeBid
 ***************************************************************************/
/***************************************************************************
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version. Although none of the code may be
 *   sold. If you have been sold this script, get a refund.
 ***************************************************************************/
include 'common.php';
// If user is not logged in redirect to login page
if (!$user->checkAuth() && $_GET['a'] != 3) {
    $_SESSION['LOGIN_MESSAGE'] = $MSG['5000'];
    header('location: user_login.php');
    exit;
}
$fees = new fees();
$paying_fee = true;
switch ($_GET['a']) {
    case 1:
        // add to account balance
        $payvalue = $system->input_money($_POST['pfval']);
        $custoncode = $user->user_data['id'] . 'WEBID1';
        $message = sprintf($MSG['582'], $system->print_money($payvalue));
        $title = $system->SETTINGS['sitename'] . ' - ' . $MSG['935'];
        $fees->add_to_account($MSG['935'], 'balance', $payvalue);
        break;
    case 2:
        // pay for an item
        $query = "SELECT w.id, w.seller, a.title, a.shipping_cost, a.additional_shipping_cost, a.shipping, w.bid,\n\t\t\t\tu.id As uid, u.nick, a.payment, w.qty\n\t\t\t\tFROM " . $DBPrefix . "winners w\n\t\t\t\tLEFT JOIN " . $DBPrefix . "auctions a ON (a.id = w.auction)\n\t\t\t\tLEFT JOIN " . $DBPrefix . "users u ON (u.id = w.seller)\n\t\t\t\tWHERE w.id = :pfval AND w.winner = :user_id";
        $params = array();
        $params[] = array(':pfval', $_POST['pfval'], 'int');