public function payment_change() { $this->set_header(); $obj_payment_select = new ectools_payment_select(); if ($_POST['payment']['currency']) { $sdf['cur'] = $_POST['payment']['currency']; } if ($_POST['shipping']) { $shipping = json_decode($_POST['shipping'], true); $this->pagedata['has_cod'] = $shipping['has_cod']; } $currency = app::get('ectools')->model('currency'); $this->pagedata['currencys'] = $currency->getList('cur_id,cur_code,cur_name'); $def_currency = app::get('b2c')->getConf('site.currency.defalt_currency'); $this->pagedata['current_currency'] = $sdf['cur'] ? $sdf['cur'] : $def_currency; $this->pagedata['app_id'] = $app_id; echo $obj_payment_select->select_pay_method($this, $sdf, false); exit; }
public function payment_change() { $this->set_header(); $obj_payment_select = new ectools_payment_select(); if ($_POST['payment']['currency']) { $sdf['cur'] = $_POST['payment']['currency']; } if ($_POST['shipping']) { $shipping = json_decode($_POST['shipping'], true); $this->pagedata['has_cod'] = $shipping['has_cod']; } $currency = app::get('ectools')->model('currency'); $this->pagedata['currencys'] = $currency->getList('cur_id,cur_code,cur_name'); $this->pagedata['current_currency'] = $sdf['cur'] ? $sdf['cur'] : ''; $this->pagedata['app_id'] = $app_id; echo $obj_payment_select->select_pay_method($this, $sdf, false, false, array('iscommon', 'iswap'), 'wap/cart/checkout/select_currency.html'); exit; }
function select_payment() { if ($_POST['payment']['currency']) { $sdf['cur'] = $_POST['payment']['currency']; } if ($_POST['shipping']['shipping_id']) { $has_cod = app::get('b2c')->model('dlytype')->getList('has_cod', array('dt_id' => $_POST['shipping']['shipping_id'])); #$this->pagedata['has_cod'] = $has_cod[0]['has_cod'] =='true' ? 'true' : 'false'; } $obj_payment_select = new ectools_payment_select(); $currency = app::get('ectools')->model('currency'); //$this->pagedata['currencys'] = $currency->getList('cur_id,cur_code,cur_name'); //$this->pagedata['current_currency'] = $sdf['cur'] ? $sdf['cur'] : ''; //$this->pagedata['app_id'] = 'b2c';//$app_id; //$this->pagedata['pay_app_id'] = $_POST['payment']['def_pay']['pay_app_id']; //$this->pagedata['payment_html'] = $obj_payment_select->select_pay_method($this,$sdf); //echo $this->fetch('site/common/select_payment.html'); $payments = $obj_payment_select->select_pay_method($this, $sdf, false, false, array('iscommon', 'iswap'), 'API'); $payments_ret = array(); foreach ($payments as $key => $value) { $payments_ret[] = $value; } return $payments_ret; }
public function payment_change() { $obj_payment_select = new ectools_payment_select(); if ($_POST['payment']['currency']) { $sdf['cur'] = $_POST['payment']['currency']; } if ($_POST['shipping']) { $shipping = json_decode($_POST['shipping'], true); $this->pagedata['has_cod'] = $shipping['has_cod']; } $currency = app::get('ectools')->model('currency'); $this->pagedata['currencys'] = $currency->getList('cur_id,cur_code,cur_name'); $this->pagedata['current_currency'] = $sdf['cur'] ? $sdf['cur'] : ''; $this->pagedata['app_id'] = $app_id; $payments = $obj_payment_select->select_pay_method($this, $sdf, false, false, array('iscommon', 'iswap'), 'API'); $payments_ret = array(); foreach ($payments as $key => $value) { $payments_ret[] = $value; } return $payments_ret; }
public function payment_change() { $this->set_header(); $obj_payment_select = new ectools_payment_select(); if ($_POST['payment']['currency']) { $sdf['cur'] = $_POST['payment']['currency']; } if (empty($_POST['shipping']) && empty($_COOKIE['purchase']['shipping'])) { exit('请选择配送区域'); } $_POST['shipping'] = empty($_POST['shipping']) ? $_COOKIE['purchase']['shipping'] : $_POST['shipping']; if ($_POST['shipping']) { $shipping = json_decode($_POST['shipping'], true); $this->pagedata['has_cod'] = $shipping['has_cod']; } $currency = app::get('ectools')->model('currency'); $this->pagedata['currencys'] = $currency->getList('cur_id,cur_code,cur_name'); $this->pagedata['current_currency'] = $sdf['cur'] ? $sdf['cur'] : ''; $this->pagedata['app_id'] = $app_id; $arrMember = $this->get_current_member(); $member_id = $arrMember['member_id']; $member = $this->app->model('members'); $data = $member->dump($member_id, 'advance'); $this->pagedata['total'] = $data['advance']['total']; //判断微信端,wap端 if (kernel::single('weixin_wechat')->from_weixin()) { $plan = 'iswx'; } else { $plan = 'iswap'; } return $obj_payment_select->select_pay_method($this, $sdf, false, false, array('iscommon', $plan), 'wap/cart/checkout/select_currency.html'); exit; }
public function payment() { //$this->_get_cart(); $obj_payment_select = new ectools_payment_select(); $sdf = $_POST; echo $obj_payment_select->select_pay_method($this, $sdf); exit; }
function select_payment() { if ($_POST['payment']['currency']) { $sdf['cur'] = $_POST['payment']['currency']; } if ($_POST['shipping']['shipping_id']) { $has_cod = app::get('b2c')->model('dlytype')->getList('has_cod', array('dt_id' => $_POST['shipping']['shipping_id'])); $this->pagedata['has_cod'] = $has_cod[0]['has_cod'] == 'true' ? 'true' : 'false'; } $obj_payment_select = new ectools_payment_select(); $currency = app::get('ectools')->model('currency'); $this->pagedata['currencys'] = $currency->getList('cur_id,cur_code,cur_name'); $this->pagedata['current_currency'] = $sdf['cur'] ? $sdf['cur'] : ''; $this->pagedata['app_id'] = 'b2c'; //$app_id; $this->pagedata['pay_app_id'] = $_POST['payment']['def_pay']['pay_app_id']; $this->pagedata['payment_html'] = $obj_payment_select->select_pay_method($this, $sdf, $member_id = 0, $is_backend = false, $platform = array('iscommon', 'ispc'), $front_tpl = "site/common/choose_payment.html", $_POST['czkcz']); echo $this->fetch('site/common/select_payment.html'); exit; }
/** * 得到订单相应的支付信息 * @param null * @return null */ public function payment() { $obj_payment_select = new ectools_payment_select(); $sdf = $_POST; echo $obj_payment_select->select_pay_method($this, $sdf, $sdf['member_id'], true); exit; }
function select_payment() { if ($_POST['payment']['currency']) { $sdf['cur'] = $_POST['payment']['currency']; } if ($_POST['shipping']['shipping_id']) { $has_cod = app::get('b2c')->model('dlytype')->getList('has_cod', array('dt_id' => $_POST['shipping']['shipping_id'])); #$this->pagedata['has_cod'] = $has_cod[0]['has_cod'] =='true' ? 'true' : 'false'; } $obj_payment_select = new ectools_payment_select(); $currency = app::get('ectools')->model('currency'); $this->pagedata['currencys'] = $currency->getList('cur_id,cur_code,cur_name'); $this->pagedata['current_currency'] = $sdf['cur'] ? $sdf['cur'] : ''; $this->pagedata['app_id'] = 'b2c'; //$app_id; $this->pagedata['pay_app_id'] = $_POST['payment']['def_pay']['pay_app_id']; $this->pagedata['payment_html'] = $obj_payment_select->select_pay_method($this, $sdf); echo $this->fetch('site/common/select_payment.html'); exit; }
public function payment() { //$this->_get_cart(); $obj_payment_select = new ectools_payment_select(); $sdf = $_POST; header("Cache-Control:no-store, no-cache, must-revalidate"); // HTTP/1.1 header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // 强制查询etag header('Progma: no-cache'); /** * 额外设置的地址checkbox是否显示 */ $is_recsave_display = 'true'; $is_rec_addr_edit = 'true'; $app_id = 'b2c'; $obj_recsave_checkbox = kernel::servicelist('b2c.checkout_recsave_checkbox'); $arr_extends_checkout = array(); if ($obj_recsave_checkbox) { foreach ($obj_recsave_checkbox as $object) { if (!is_object($object)) { continue; } if (method_exists($object, 'get_order')) { $index = $object->get_order(); } else { $index = 10; } while (true) { if (!isset($arr_extends_checkout[$index])) { break; } $index++; } $arr_extends_checkout[$index] = $object; } ksort($arr_extends_checkout); } if ($arr_extends_checkout) { foreach ($arr_extends_checkout as $obj) { if (method_exists($obj, 'check_display')) { $obj->check_display($is_recsave_display); } if (method_exists($obj, 'check_edit')) { $obj->check_edit($is_rec_addr_edit); } if (method_exists($obj, 'check_app_id')) { $obj->check_app_id($app_id); } } } $this->pagedata['app_id'] = $app_id; echo $obj_payment_select->select_pay_method($this, $sdf, false); exit; }
function select_payment() { if ($_POST['payment']['currency']) { $sdf['cur'] = $_POST['payment']['currency']; } if ($_POST['shipping']['shipping_id']) { $has_cod = app::get('b2c')->model('dlytype')->getList('has_cod', array('dt_id' => $_POST['shipping']['shipping_id'])); #$this->pagedata['has_cod'] = $has_cod[0]['has_cod'] =='true' ? 'true' : 'false'; } $obj_payment_select = new ectools_payment_select(); $currency = app::get('ectools')->model('currency'); $this->pagedata['currencys'] = $currency->getList('cur_id,cur_code,cur_name'); $this->pagedata['current_currency'] = $sdf['cur'] ? $sdf['cur'] : ''; $this->pagedata['app_id'] = 'b2c'; //$app_id; $this->pagedata['pay_app_id'] = $_POST['payment']['def_pay']['pay_app_id']; $arrMember = $this->get_current_member(); $member_id = $arrMember['member_id']; $member = $this->app->model('members'); $data = $member->dump($member_id, 'advance'); $this->pagedata['total'] = $data['advance']['total']; $this->pagedata['_page'] = '_order'; //判断wap 还是微信 if (kernel::single('weixin_wechat')->from_weixin()) { $pay_plan = 'iswx'; } else { $pay_plan = 'iswap'; } $this->pagedata['payment_html'] = $obj_payment_select->select_pay_method($this, $sdf, false, false, array('iscommon', $pay_plan), 'wap/cart/checkout/select_currency2.html'); echo $this->fetch('wap/order/select_payment.html'); exit; }