Exemple #1
0
// +----------------------------------------------------------------------
// | Copyright (c) 2015 http://demila.org All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Email author@demila.org
// +----------------------------------------------------------------------
_setView(__FILE__);
_setTitle($langArray['make_payment_setTitle']);
$deposit_id = 0;
if (isset($_SESSION['tmp']['deposit_id'])) {
    $deposit_id = (int) $_SESSION['tmp']['deposit_id'];
}
require_once ROOT_PATH . '/apps/users/models/deposit.class.php';
$cms = new deposit();
$deposit_info = $cms->get($deposit_id);
//充值信息
if ($deposit_info) {
    $payments = glob(dirname(dirname(dirname(__FILE__))) . '/payments/controllers/*.php');
    $payments_data = array();
    //充值方式
    if ($payments) {
        $order_obj = array();
        $key = 'chinabank';
        require_once ROOT_PATH . '/apps/payments/models/' . $key . '.class.php';
        $order_obj[$key] = new $key();
        $payments_data[$key] = array('title' => '网银在线', 'description' => '网银在线订单支付', 'form' => $order_obj[$key]->generateDepositForm($deposit_info), 'logo' => '');
        if ($payments_data) {
            abr('payments_data', $payments_data);
        } else {
            addErrorMessage($langArray['no_payment_methods'], '', 'error');
Exemple #2
0
// | Email author@demila.org
// +----------------------------------------------------------------------
_setView(__FILE__);
_setTitle($langArray['deposit_cash_set']);
$command = get_id(2);
$depositID = get_id(3);
if (!check_login_bool() && $command != 'success' && $command != 'notify') {
    $_SESSION['temp']['golink'] = '/' . $languageURL . 'deposit/';
    refresh('/' . $languageURL . 'sign_in/');
}
if (isset($_SESSION['tmp']['deposit_id']) && $_SESSION['tmp']['deposit_id']) {
    $_SESSION['tmp']['deposit_id'] = 0;
}
if ($command == 'success' && $depositID) {
    $depositClass = new deposit();
    $info = $depositClass->get($depositID);
    if ($info && $info['paid'] == 'true') {
        refresh('http://' . $config['domain'] . '/' . $languageURL . 'deposit/', $langArray['complete_deposit'], 'complete');
    } else {
        refresh('http://' . $config['domain'] . '/' . $languageURL . 'deposit/', $langArray['error_deposit'], 'error');
    }
}
if (isset($_POST['amount'])) {
    $depositClass = new deposit();
    $depositID = $depositClass->add();
    if ($depositID !== FALSE) {
        if (isset($_SESSION['tmp']['order_id'])) {
            unset($_SESSION['tmp']['order_id']);
        }
        $_SESSION['tmp']['deposit_id'] = $depositID;
        refresh('/' . $languageURL . 'users/payment/');
Exemple #3
0
    $order_id = $the_order[1];
    if ($order_type == '0') {
        //支付宝直接购买订单
        require_once ROOT_PATH . '/apps/items/models/orders.class.php';
        $cms = new orders();
        $order_info = $cms->get($order_id);
        if ($order_info['paid'] == 'false') {
            $cms->orderIsPay($order_id, '支付宝支付');
        } else {
            echo "success";
            //请不要修改或删除
        }
    } elseif ($order_type == 1) {
        //充值订单
        require_once ROOT_PATH . '/apps/users/models/deposit.class.php';
        $cms = new deposit();
        $order_info = $cms->get($order_id);
        if ($order_info['paid'] == 'false') {
            $cms->depositIsPay($order_id, '支付宝');
        } else {
            echo 'success';
        }
    }
    //echo "success";		//请不要修改或删除
    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
} else {
    //验证失败
    echo "fail";
    //调试用,写文本函数记录程序运行情况是否正常
    //logResult("这里写入想要调试的代码变量值,或其他运行的结果记录");
}