當前位置: 首頁>>代碼示例>>PHP>>正文


PHP payment::pay_set方法代碼示例

本文整理匯總了PHP中payment::pay_set方法的典型用法代碼示例。如果您正苦於以下問題:PHP payment::pay_set方法的具體用法?PHP payment::pay_set怎麽用?PHP payment::pay_set使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在payment的用法示例。


在下文中一共展示了payment::pay_set方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: payment

    }
    /* 檢查訂單用戶跟當前用戶是否一致 */
    if ($_SESSION['user_id'] != $order['user_id']) {
        ecs_header("Location: ./\n");
        exit;
    }
    /* 檢查訂單是否未付款和未發貨 以及訂單金額是否為0 和支付id是否為改變*/
    if ($order['pay_status'] != PS_UNPAYED || $order['shipping_status'] != SS_UNSHIPPED || $order['goods_amount'] <= 0 || $order['pay_id'] == $pay_id) {
        ecs_header("Location: user.php?act=order_detail&order_id={$order_id}\n");
        exit;
    }
    if ($pay_id != 2) {
        //dump($pay_id);
        include_once 'includes/modules/payment/payment.php';
        $pay_obj = new payment();
        $pay_obj->pay_set($order['order_id'], $pay_id, $order['goods_amount']);
    } elseif ($pay_id == 2) {
        $db->query("update " . $ecs->table('order_info') . " set pay_name = '貨到付款',pay_num = {$pay_id} where order_id = {$order['order_id']}");
    }
    ecs_header("Location: user.php?act=order_detail&order_id={$order_id}\n");
    exit;
} elseif ($action == 'save_order_address') {
    include_once ROOT_PATH . 'includes/lib_transaction.php';
    $address = array('consignee' => isset($_POST['consignee']) ? compile_str(trim($_POST['consignee'])) : '', 'email' => isset($_POST['email']) ? compile_str(trim($_POST['email'])) : '', 'address' => isset($_POST['address']) ? compile_str(trim($_POST['address'])) : '', 'zipcode' => isset($_POST['zipcode']) ? compile_str(make_semiangle(trim($_POST['zipcode']))) : '', 'tel' => isset($_POST['tel']) ? compile_str(trim($_POST['tel'])) : '', 'mobile' => isset($_POST['mobile']) ? compile_str(trim($_POST['mobile'])) : '', 'sign_building' => isset($_POST['sign_building']) ? compile_str(trim($_POST['sign_building'])) : '', 'best_time' => isset($_POST['best_time']) ? compile_str(trim($_POST['best_time'])) : '', 'order_id' => isset($_POST['order_id']) ? intval($_POST['order_id']) : 0);
    if (save_order_address($address, $user_id)) {
        ecs_header('Location: user.php?act=order_detail&order_id=' . $address['order_id'] . "\n");
        exit;
    } else {
        $err->show($_LANG['order_list_lnk'], 'user.php?act=order_list');
    }
} elseif ($action == 'bonus') {
開發者ID:dlpc,項目名稱:ecshop,代碼行數:31,代碼來源:user.php

示例2: array

 /*if ($payment['is_cod'] == 1)
   {
       $order = order_info($order_id);
       $region_id_list = array(
           $order['country'], $order['province'], $order['city'], $order['district']
       );
       $shipping = shipping_area_info($order['shipping_id'], $region_id_list);
       $pay_fee = pay_fee($pay_id, $order_amount, $shipping['pay_fee']);
   }
   else
   {
       $pay_fee = pay_fee($pay_id, $order_amount);
   }*/
 include_once '../includes/modules/payment/payment.php';
 $pay_obj = new payment();
 $order['pay_num'] = $pay_obj->pay_set($order_id, $pay_id, $order_amount);
 /* 保存訂單 */
 /* $order = array(
        'pay_id' => $pay_id,
        'pay_name' => addslashes($payment['pay_name']),
        'pay_fee' => $pay_fee
    );
    update_order($order_id, $order);*/
 update_order_amount($order_id);
 /* 更新 pay_log */
 update_pay_log($order_id);
 /* todo 記錄日誌 */
 $sn = $old_order['order_sn'];
 $new_order = order_info($order_id);
 if ($old_order['total_fee'] != $new_order['total_fee']) {
     $sn .= ',' . sprintf($_LANG['order_amount_change'], $old_order['total_fee'], $new_order['total_fee']);
開發者ID:dlpc,項目名稱:ecshop,代碼行數:31,代碼來源:order.php

示例3: payment

 
         include_once('includes/modules/payment/' . $payment['pay_code'] . '.php');
 
         $pay_obj    = new $payment['pay_code'];
 
         $pay_online = $pay_obj->get_code($order, unserialize_config($payment['pay_config']));
 
         $order['pay_desc'] = $payment['pay_desc'];
 
         $smarty->assign('pay_online', $pay_online);
     } */
 if ($order['order_amount'] > 0) {
     if ($order['pay_num'] != 2) {
         include_once 'includes/modules/payment/payment.php';
         $pay_obj = new payment();
         $order['pay_num'] = $pay_obj->pay_set($order['order_id'], $order['pay_num'], $order['goods_amount']);
         $pay_online = $pay_obj->get_code($order);
         $smarty->assign('pay_online', $pay_online);
     }
 } elseif ($order['order_amount'] <= 0 && $order['pay_num'] == 1) {
     $sign_message = 'order_id=' . $order['order_id'] . '&payprice=' . $order['order_amount'] . '&email=0&user_id=' . $order['user_id'] . '&datetime=' . gmtime() . '&ip_addr=' . real_ip();
     $key_value = 'untx';
     $sign_message_md = md5($sign_message . $key_value);
     $smarty->assign('sign_message', $sign_message);
     // 地址欄相關參數鏈接
     $smarty->assign('sign_message_md', $sign_message_md);
     // 地址欄md5加密之後傳遞的參數
     $smarty->assign('lucky_draw', 1);
 }
 /* ccx 2014-12-14 判斷如果是貨到付款的情況,也有抽獎機會  結束*/
 /*end*/
開發者ID:dlpc,項目名稱:ecshop,代碼行數:30,代碼來源:flow.php


注:本文中的payment::pay_set方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。