当前位置: 首页>>代码示例>>PHP>>正文


PHP vmc::openapi_url方法代码示例

本文整理汇总了PHP中vmc::openapi_url方法的典型用法代码示例。如果您正苦于以下问题:PHP vmc::openapi_url方法的具体用法?PHP vmc::openapi_url怎么用?PHP vmc::openapi_url使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在vmc的用法示例。


在下文中一共展示了vmc::openapi_url方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: index

 public function index($enc_str)
 {
     $app_define = utils::decrypt($enc_str);
     $action_url = urldecode($action_url);
     $obj_wstage = vmc::singleton('wechat_stage');
     $access_token = $obj_wstage->get_access_token(false, $app_define);
     $app_id = $app_define['app_id'];
     vmc::singleton('base_session')->start();
     $session_str = utils::encrypt(array('session_id' => vmc::singleton('base_session')->sess_id() . '|' . time()));
     $session_str = app::get('mobile')->router()->encode_args($session_str);
     $redirect_uri = vmc::openapi_url('openapi.toauth', 'callback', array('wechat_toauth_pam' => 'callback')) . '?qrlp=' . $session_str;
     $forward = $_GET['forward'];
     $state = app::get('mobile')->router()->gen_url(array('app' => 'wechat', 'ctl' => 'mobile_wxqrlogin', 'act' => 'dologin'));
     $long_url = "https://open.weixin.qq.com/connect/oauth2/authorize?appid={$app_id}&redirect_uri={$redirect_uri}&response_type=code&scope=snsapi_userinfo&state={$state}#wechat_redirect";
     if (!$access_token) {
         $this->splash('error', '', '二维码生成失败');
     }
     if ($surl = $obj_wstage->gen_surl($long_url, $access_token, $msg)) {
         $this->pagedata['surl'] = $surl;
     } else {
         $this->splash('error', '', '二维码生成失败:' . $msg);
     }
     // if($this->_reqeust->is_ajax()){
     //     $qrcode = vmc::singleton('wechat_qrcode')->create($surl);
     //     $qrcode_url = base_storager::inmage_path($qrcode['image_id']);
     //     $this->splash('success','',array('qrcode_url'=>$qrcode_url));
     // }
     $this->pagedata['forward'] = $forward;
     $this->page('site/loginqrcode.html');
 }
开发者ID:yindonghai,项目名称:msk.com,代码行数:30,代码来源:wxqrlogin.php

示例2: input_category

 public function input_category($params)
 {
     $mdl_goods_cat = app::get('b2c')->model('goods_cat');
     $render = new base_render(app::get('b2c'));
     $params['cat_openapi'] = vmc::openapi_url('openapi.goods', 'catalog');
     $params['cat_path_openapi'] = vmc::openapi_url('openapi.goods', 'catalog_path');
     $params['domid'] = substr(md5(uniqid()), 0, 6);
     $render->pagedata['tree_data_root'] = $mdl_goods_cat->get_tree();
     if ($params['value'] && $params['value'] > 0) {
         $cat = $mdl_goods_cat->getRow('cat_path,cat_id', array('cat_id' => $params['value']));
         if ($cat) {
             $cat_path = $cat['cat_path'];
             $cat_path_arr = explode(',', $cat_path);
             $cat_path_length = count($cat_path_arr);
             $render->pagedata['root'] = $cat_path_arr[0];
             $render->pagedata['cat_path_length'] = $cat_path_length;
             foreach ($cat_path_arr as $k => $cat_id) {
                 $clist = $mdl_goods_cat->get_tree($cat_id);
                 if ($clist) {
                     $tree_data[$cat_id] = $clist;
                     if ($tree_data[$cat_id][$cat_path_arr[$k + 1]]) {
                         $tree_data[$cat_id][$cat_path_arr[$k + 1]]['selected'] = true;
                     }
                 }
             }
             $render->pagedata['tree_data'] = $tree_data;
         }
     }
     $render->pagedata['params'] = $params;
     return $render->fetch('common/category.html');
 }
开发者ID:yindonghai,项目名称:msk.com,代码行数:31,代码来源:input.php

示例3: __construct

 /**
  * 构造方法.
  *
  * @param null
  *
  * @return bool
  */
 public function __construct($app)
 {
     parent::__construct($app);
     if (!$this->login_type) {
         trigger_error('login_type 未定义!', E_USER_ERROR);
     }
     $this->callback_url = vmc::openapi_url('openapi.toauth', 'callback', array(__CLASS__ => 'callback'));
 }
开发者ID:yindonghai,项目名称:msk.com,代码行数:15,代码来源:sina.php

示例4: __construct

 /**
  * 构造方法.
  *
  * @param null
  *
  * @return bool
  */
 public function __construct($app)
 {
     parent::__construct($app);
     $this->callback_url = vmc::openapi_url('openapi.ectools_payment', 'getway_callback', array('ectools_payment_applications_alipay' => 'callback'));
     $this->notify_url = vmc::openapi_url('openapi.ectools_payment', 'getway_callback', array('ectools_payment_applications_alipay' => 'notify'));
     $this->submit_url = 'https://mapi.alipay.com/gateway.do?_input_charset=utf-8';
     $this->submit_method = 'POST';
     $this->submit_charset = 'utf-8';
 }
开发者ID:yindonghai,项目名称:msk.com,代码行数:16,代码来源:alipay.php

示例5: index

 public function index()
 {
     $this->pagedata['wxpay_classname'] = 'wechat_payment_applications_wxpay';
     $jsapi_url = vmc::singleton('mobile_router')->gen_url(array('app' => 'b2c', 'ctl' => 'mobile_checkout', 'act' => 'dopayment', 'full' => true));
     $jsapi_url = explode('/', $jsapi_url);
     array_pop($jsapi_url);
     $jsapi_dir = implode('/', $jsapi_url) . '/';
     $this->pagedata['wx_business_api'] = array('JSAPI网页支付' => array('支付授权目录' => $jsapi_dir), 'NATIVE原生支付' => array('支付回调URL' => vmc::openapi_url('openapi.ectools_payment', 'getway_callback', array('wechat_payment_applications_alipay' => 'notify'))), 'APP客户端支付成功通知' => array('支付回调URL' => vmc::openapi_url('openapi.ectools_payment', 'getway_callback', array('wechat_payment_applications_alipay' => 'notify'))));
     $this->page('admin/business/setting.html');
 }
开发者ID:yindonghai,项目名称:msk.com,代码行数:10,代码来源:setting.php

示例6: __construct

 /**
  * 构造方法.
  *
  * @param null
  *
  * @return bool
  */
 public function __construct($app)
 {
     parent::__construct($app);
     $this->callback_url = vmc::openapi_url('openapi.ectools_payment', 'getway_callback', array('ectools_payment_applications_chinapay' => 'callback'));
     $this->notify_url = vmc::openapi_url('openapi.ectools_payment', 'getway_callback', array('ectools_payment_applications_chinapay' => 'notify'));
     $this->submit_url = 'https://payment.ChinaPay.com/pay/TransGet';
     if (constant('CHINAPAY_TEST')) {
         $this->submit_url = 'http://payment-test.ChinaPay.com/pay/TransGet';
     }
     $this->submit_method = 'POST';
     $this->submit_charset = 'utf-8';
 }
开发者ID:noikiy,项目名称:snk,代码行数:19,代码来源:chinapay.php

示例7: runtask

 public function runtask($task_id)
 {
     $http = new base_httpclient();
     $_POST['task_id'] = $task_id;
     $url = vmc::openapi_url('openapi.queue', 'worker', array('task_id' => $task_id));
     logger::info('Spawn [Task-' . $task_id . '] ' . $url);
     //99%概率不会有问题
     $http->hostaddr = $_SERVER['SERVER_ADDR'] ? $_SERVER['SERVER_ADDR'] : '127.0.0.1';
     $http->hostport = $_SERVER['SERVER_PORT'] ? $_SERVER['SERVER_PORT'] : '80';
     $http->set_timeout(2);
     logger::info($http->post($url, $_POST));
 }
开发者ID:yindonghai,项目名称:msk.com,代码行数:12,代码来源:queue.php

示例8: detail_products

 public function detail_products($gid)
 {
     $mdl_products = app::get('b2c')->model('products');
     $products = $mdl_products->getList('*', array('goods_id' => $gid));
     $mdl_stock = app::get('b2c')->model('stock');
     $sku_bn = array_keys(utils::array_change_key($products, 'bn'));
     $stock_list = $mdl_stock->getList('*', array('sku_bn' => $sku_bn));
     $stock_list = utils::array_change_key($stock_list, 'sku_bn');
     $render = $this->app->render();
     $render->pagedata['data_detail'] = app::get('b2c')->model('goods')->dump($gid, '*', 'default');
     $render->pagedata['products'] = $products;
     $render->pagedata['stock_list'] = $stock_list;
     $render->pagedata['gpromotion_openapi'] = vmc::openapi_url('openapi.goods', 'promotion', array('goods_id' => $gid));
     return $render->fetch('admin/goods/detail/detail.html');
 }
开发者ID:yindonghai,项目名称:msk.com,代码行数:15,代码来源:goods.php

示例9: get_api

 public function get_api($eid)
 {
     return $url = vmc::openapi_url('openapi.wechat', 'api', array('eid' => $eid));
 }
开发者ID:yindonghai,项目名称:msk.com,代码行数:4,代码来源:stage.php

示例10: get_callback_url

 /**
  * 获取回调的openapi地址.
  *
  * @param string $module 认证方式类名
  *
  * @return string 返回回调的openapi地址
  */
 public function get_callback_url($module)
 {
     return vmc::openapi_url('openapi.pam_callback', 'login', array('module' => $module, 'type' => $this->type, 'appid' => $this->appid, 'redirect' => $this->redirect_url));
 }
开发者ID:yindonghai,项目名称:msk.com,代码行数:11,代码来源:auth.php

示例11: __construct

 /**
  * 构造方法.
  *
  * @param null
  *
  * @return bool
  */
 public function __construct($app)
 {
     parent::__construct($app);
     $this->callback_url = vmc::openapi_url('openapi.ectools_payment', 'getway_callback', array('wechat_payment_applications_wxpay' => 'callback'));
     $this->notify_url = vmc::openapi_url('openapi.ectools_payment', 'getway_callback', array('wechat_payment_applications_wxpay' => 'notify'));
 }
开发者ID:yindonghai,项目名称:msk.com,代码行数:13,代码来源:wxpay.php


注:本文中的vmc::openapi_url方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。