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


PHP create_html函数代码示例

本文整理汇总了PHP中create_html函数的典型用法代码示例。如果您正苦于以下问题:PHP create_html函数的具体用法?PHP create_html怎么用?PHP create_html使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: searchOrder

 public function searchOrder($attr, $type = "bank")
 {
     $log = new PhpLog(SDK_LOG_FILE_PATH, "PRC", SDK_LOG_LEVEL);
     $log->LogInfo("============处理前台请求开始===============");
     // 初始化日志
     if ($type == "bank") {
         $merId = '898110260110001';
     } else {
         $merId = '898110260110002';
     }
     $attr['txnTime'] = date("YmdHis", strtotime($attr['trade_time']));
     $params = array('version' => '5.0.0', 'encoding' => 'utf-8', 'certId' => $this->secureUtil->getSignCertId($type), 'signMethod' => '01', 'txnType' => '00', 'txnSubType' => '00', 'bizType' => '000000', 'accessType' => '0', 'channelType' => '07', 'orderId' => $attr['trade_code'], 'merId' => $merId, 'txnTime' => $attr['txnTime']);
     //        print_r($params);
     //        exit;
     // 签名
     $this->secureUtil->sign($params, $type);
     // 前台请求地址
     $front_uri = SDK_SINGLE_QUERY_URL;
     $log->LogInfo("前台请求地址为>" . $front_uri);
     // 构造 自动提交的表单
     $html_form = create_html($params, $front_uri);
     $api_client = new FApiClient();
     $res = $api_client->unionPaySend($front_uri, $params, "post");
     $log->LogInfo("-------前台交易自动提交表单>--begin----");
     $log->LogInfo($html_form);
     $log->LogInfo("-------前台交易自动提交表单>--end-------");
     $log->LogInfo("============处理前台请求 结束===========");
     //echo $html_form;
     return $res;
 }
开发者ID:niujie123,项目名称:myself,代码行数:30,代码来源:UnionPay.php

示例2: dopay

 public function dopay($money = null, $order = null, $ordername = null, $reqReserved = '透传信息')
 {
     //取插件配置参数
     $conf = F('pluginunionpay');
     if (empty($conf) || APP_DEBUG) {
         $data = M('Addons')->field('param')->where("mark='Unionpay'")->find();
         $conf = json_decode($data['param'], true);
         F('pluginunionpay', $conf);
     }
     define('UNIONPAY_MEMBER_ID', $conf['MEMBER_ID']);
     include_once UNIONPAY_PATH . '/lib/utf8/func/SDKConfig.php';
     include_once UNIONPAY_PATH . '/lib/utf8/func/common.php';
     include_once UNIONPAY_PATH . '/lib/utf8/func/PinBlock.php';
     include_once UNIONPAY_PATH . '/lib/utf8/func/PublicEncrypte.php';
     include_once UNIONPAY_PATH . '/lib/utf8/func/secureUtil.php';
     include_once UNIONPAY_PATH . '/lib/utf8/func/httpClient.php';
     /**
      *	以下代码只是为了方便商户测试而提供的样例代码,商户可以根据自己需要,按照技术文档编写。该代码仅供参考
      */
     // 初始化日志
     //$log = new PhpLog ( SDK_LOG_FILE_PATH, "PRC", SDK_LOG_LEVEL );
     //$log->LogInfo ( "============处理前台请求开始===============" );
     // 初始化日志
     $params = array('version' => '5.0.0', 'encoding' => 'utf-8', 'certId' => getSignCertId(), 'txnType' => '01', 'txnSubType' => '01', 'bizType' => '000201', 'frontUrl' => SDK_FRONT_NOTIFY_URL, 'backUrl' => SDK_BACK_NOTIFY_URL, 'signMethod' => '01', 'channelType' => '08', 'accessType' => '0', 'merId' => MEMBER_ID, 'orderId' => $order, 'txnTime' => date('YmdHis'), 'txnAmt' => $money * 100, 'currencyCode' => '156', 'orderDesc' => $ordername, 'reqReserved' => $reqReserved);
     // 签名
     sign($params);
     // 前台请求地址
     $front_uri = SDK_FRONT_TRANS_URL;
     $html_form = create_html($params, $front_uri);
     return $html_form;
 }
开发者ID:735579768,项目名称:Ainiku,代码行数:31,代码来源:UnionpayPlugin.class.php

示例3: goPay

 public function goPay($payDetail)
 {
     $this->params["txnAmt"] = $payDetail["payMoney"] * 100;
     $this->params["orderId"] = $payDetail["unitePayID"];
     $params = $this->params;
     sign($params);
     return create_html($params, SDK_FRONT_TRANS_URL);
 }
开发者ID:onlineshine,项目名称:myzf,代码行数:8,代码来源:unionpay.php

示例4: _html_list

function _html_list($mod = 'scenic/index', $page, $newhtml)
{
    $config = get_config();
    $content = curl("{$config['base_url']}index.php/{$mod}/{$page}");
    if (empty($content)) {
        return false;
    }
    return create_html($newhtml, $content);
}
开发者ID:shitfSign,项目名称:conf_system,代码行数:9,代码来源:admin_helper.php

示例5: actionPay

 public function actionPay($order_code)
 {
     $is_login = Yii::app()->session['is_login'];
     $uid = Yii::app()->session['uid'];
     $username = Yii::app()->session['username'];
     if (!isset($is_login) && !isset($uid) && empty($username) && $is_login != 1) {
         $this->redirect($this->createUrl('user/login'));
     }
     $orders = Orders::model()->find('uid=:uid and order_code=:order_code', array(':uid' => $uid, ':order_code' => $order_code));
     if (empty($order_code) || empty($orders)) {
         throw new CHttpException(400, Yii::t('yii', 'Your request is invalid.'));
     }
     $pay_price = (int) ($orders->total_price * 100);
     $params = array('version' => '5.0.0', 'encoding' => 'utf-8', 'certId' => getSignCertId(), 'txnType' => '01', 'txnSubType' => '01', 'bizType' => '000201', 'frontUrl' => SDK_FRONT_NOTIFY_URL, 'backUrl' => SDK_BACK_NOTIFY_URL, 'signMethod' => '01', 'channelType' => '08', 'accessType' => '0', 'merId' => '898110279910126', 'orderId' => $orders->order_code, 'txnTime' => date('YmdHis'), 'txnAmt' => $pay_price, 'currencyCode' => '156', 'defaultPayType' => '0001', 'reqReserved' => $orders->goods_name);
     sign($params);
     // 前台请求地址
     $front_uri = SDK_FRONT_TRANS_URL;
     // 构造 自动提交的表单
     $html_form = create_html($params, $front_uri);
     echo $html_form;
     exit;
 }
开发者ID:redtreelchao,项目名称:wander-moon,代码行数:22,代码来源:UnionpayController.php

示例6: pay

 public function pay()
 {
     $merId = empty($this->merId) ? MER_ID : $this->merId;
     $orderId = empty($this->orderId) ? date('YmdHis') : $this->orderId;
     $frontUrl = empty($this->frontUrl) ? SDK_FRONT_NOTIFY_URL : $this->frontUrl;
     $backUrl = empty($this->backUrl) ? SDK_BACK_NOTIFY_URL : $this->backUrl;
     // 初始化日志
     $log = new \PhpLog(SDK_LOG_FILE_PATH, "PRC", SDK_LOG_LEVEL);
     $log->LogInfo("============处理前台请求开始===============");
     // 初始化日志
     $params = array('version' => '5.0.0', 'encoding' => 'utf-8', 'certId' => getSignCertId(), 'txnType' => '01', 'txnSubType' => '01', 'bizType' => '000201', 'frontUrl' => $frontUrl, 'backUrl' => $backUrl, 'signMethod' => '01', 'channelType' => '08', 'accessType' => '0', 'merId' => $merId, 'orderId' => $orderId, 'txnTime' => date('YmdHis'), 'txnAmt' => $this->txnAmt, 'currencyCode' => '156', 'defaultPayType' => '0001', 'reqReserved' => $this->reqReserved);
     // 签名
     sign($params);
     // 前台请求地址
     $front_uri = SDK_FRONT_TRANS_URL;
     $log->LogInfo("前台请求地址为>" . $front_uri);
     // 构造 自动提交的表单
     $html_form = create_html($params, $front_uri);
     $log->LogInfo("-------前台交易自动提交表单>--begin----");
     //$log->LogInfo ( $html_form );
     $log->LogInfo("-------前台交易自动提交表单>--end-------");
     $log->LogInfo("============处理前台请求 结束===========");
     echo $html_form;
 }
开发者ID:xingluxin,项目名称:jianshen,代码行数:24,代码来源:UnionPay.class.php

示例7: intval

<?php

//header ( 'Content-type:text/html;charset=utf-8' );
require_once './config_wap.php';
//银联wap配置文件
$payment_notice_id = intval($_REQUEST['payment_notice_id']);
$payment_notice = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "payment_notice where id = " . $payment_notice_id);
$money = round($payment_notice['money'], 2) * 100;
$payment_info = $GLOBALS['db']->getRow("select id,config,logo from " . DB_PREFIX . "payment where id=" . intval($payment_notice['payment_id']));
$payment_info['config'] = unserialize($payment_info['config']);
$parameter = array('version' => '5.0.0', 'encoding' => 'utf-8', 'certId' => getSignCertId(), 'txnType' => '01', 'txnSubType' => '01', 'bizType' => '000201', 'frontUrl' => SDK_FRONT_NOTIFY_URL, 'backUrl' => SDK_BACK_NOTIFY_URL, 'signMethod' => '01', 'channelType' => '08', 'accessType' => '0', 'merId' => $payment_info['config']['merId'], 'orderId' => $payment_notice['notice_sn'], 'txnTime' => to_date($payment_notice['create_time'], 'YmdHis'), 'txnAmt' => $money, 'currencyCode' => '156', 'reqReserved' => $payment_notice_id);
//签名
sign($parameter);
// 前台请求地址
$front_uri = SDK_FRONT_TRANS_URL;
$payLinks = create_html($parameter, $front_uri);
/**
    $log = new PhpLog ( SDK_LOG_FILE_PATH, "PRC", SDK_LOG_LEVEL );
$log->LogInfo ( "前台请求地址为>" . $front_uri );
$log->LogInfo ( "-------前台交易自动提交表单>--begin----" );
$log->LogInfo ( $payLinks );
$log->LogInfo ( "-------前台交易自动提交表单>--end-------" );
$log->LogInfo ( "============处理前台请求 结束===========" );
*/
header('Content-type:text/html;charset=utf-8');
echo $payLinks;
开发者ID:BruceJi,项目名称:fanwe,代码行数:26,代码来源:unionpayapi.php

示例8: header

<?php 
header('Content-type:text/html;charset=utf-8');
include_once $_SERVER['DOCUMENT_ROOT'] . '/upacp_sdk_php/utf8/func/common.php';
include_once $_SERVER['DOCUMENT_ROOT'] . '/upacp_sdk_php/utf8/func/SDKConfig.php';
include_once $_SERVER['DOCUMENT_ROOT'] . '/upacp_sdk_php/utf8/func/secureUtil.php';
include_once $_SERVER['DOCUMENT_ROOT'] . '/upacp_sdk_php/utf8/func/log.class.php';
/**
 * 消费交易-前台 
 */
/**
 *	以下代码只是为了方便商户测试而提供的样例代码,商户可以根据自己需要,按照技术文档编写。该代码仅供参考
 */
// 初始化日志
$log = new PhpLog(SDK_LOG_FILE_PATH, "PRC", SDK_LOG_LEVEL);
$log->LogInfo("============处理前台请求开始===============");
// 初始化日志
$params = array('version' => '5.0.0', 'encoding' => 'utf-8', 'certId' => getSignCertId(), 'txnType' => '01', 'txnSubType' => '01', 'bizType' => '000201', 'frontUrl' => SDK_FRONT_NOTIFY_URL, 'backUrl' => SDK_BACK_NOTIFY_URL, 'signMethod' => '01', 'channelType' => '08', 'accessType' => '0', 'merId' => '888888888888888', 'orderId' => date('YmdHis'), 'txnTime' => date('YmdHis'), 'txnAmt' => '100', 'currencyCode' => '156', 'defaultPayType' => '0001', 'reqReserved' => ' 透传信息');
// 签名
sign($params);
// 前台请求地址
$front_uri = SDK_FRONT_TRANS_URL;
$log->LogInfo("前台请求地址为>" . $front_uri);
// 构造 自动提交的表单
$html_form = create_html($params, $front_uri);
$log->LogInfo("-------前台交易自动提交表单>--begin----");
$log->LogInfo($html_form);
$log->LogInfo("-------前台交易自动提交表单>--end-------");
$log->LogInfo("============处理前台请求 结束===========");
echo $html_form;
开发者ID:184609680,项目名称:wcy_O2O_95180,代码行数:29,代码来源:Form_6_2_FrontConsume.php

示例9: exit

            $ret['uniacid'] = $log['uniacid'];
            $ret['result'] = 'success';
            $ret['type'] = $log['type'];
            $ret['from'] = 'return';
            $ret['tid'] = $log['tid'];
            $ret['uniontid'] = $log['uniontid'];
            $ret['user'] = $log['openid'];
            $ret['fee'] = $log['fee'];
            $ret['tag'] = $log['tag'];
            $ret['is_usecard'] = $log['is_usecard'];
            $ret['card_fee'] = $log['card_fee'];
            $ret['card_id'] = $log['card_id'];
            $site->{$method}($ret);
            exit('success');
        }
    }
}
$sql = 'SELECT * FROM ' . tablename('core_paylog') . ' WHERE `plid`=:plid';
$paylog = pdo_fetch($sql, array(':plid' => $params['tid']));
if (!empty($paylog) && $paylog['status'] != '0') {
    exit('这个订单已经支付成功, 不需要重复支付.');
}
$auth = sha1($sl . $paylog['uniacid'] . $_W['config']['setting']['authkey']);
if ($auth != $_GPC['auth']) {
    exit('参数传输错误.');
}
$_W['openid'] = intval($paylog['openid']);
$params = array('version' => '5.0.0', 'encoding' => 'utf-8', 'certId' => getSignCertId(), 'txnType' => '01', 'txnSubType' => '01', 'bizType' => '000201', 'frontUrl' => SDK_FRONT_NOTIFY_URL . '?i=' . $_W['uniacid'], 'backUrl' => SDK_BACK_NOTIFY_URL . '?i=' . $_W['uniacid'], 'signMethod' => '01', 'channelType' => '08', 'accessType' => '0', 'merId' => SDK_MERID, 'orderId' => $paylog['uniontid'], 'txnTime' => date('YmdHis'), 'txnAmt' => $paylog['fee'] * 100, 'currencyCode' => '156', 'defaultPayType' => '0001', 'reqReserved' => $_W['uniacid']);
sign($params);
$html_form = create_html($params, SDK_FRONT_TRANS_URL);
echo $html_form;
开发者ID:wisemyth,项目名称:weizan,代码行数:31,代码来源:pay.php

示例10: date

require ROOT . '/classes/datamgr/order.cls.php';
include_once ROOT . '/libs/unionpay/utf8/func/common.php';
/**
 * 重要:联调测试时请仔细阅读注释!
 * 
 * 产品:跳转网关支付产品<br>
 * 交易:消费:前台跳转,有前台通知应答和后台通知应答<br>
 * 日期: 2015-09<br>
 * 版本: 1.0.0
 * 版权: 中国银联<br>
 * 说明:以下代码只是为了方便商户测试而提供的样例代码,商户可以根据自己需要,按照技术文档编写。该代码仅供参考,不提供编码性能规范性等方面的保障<br>
 * 提示:该接口参考文档位置:open.unionpay.com帮助中心 下载  产品接口规范  《网关支付产品接口规范》,<br>
 *              《平台接入接口规范-第5部分-附录》(内包含应答码接口规范,全渠道平台银行名称-简码对照表)<br>
 *              《全渠道平台接入接口规范 第3部分 文件接口》(对账文件格式说明)<br>
 * 测试过程中的如果遇到疑问或问题您可以:1)优先在open平台中查找答案:
 * 							        调试过程中的问题或其他问题请在 https://open.unionpay.com/ajweb/help/faq/list 帮助中心 FAQ 搜索解决方案
 *                             测试过程中产生的6位应答码问题疑问请在https://open.unionpay.com/ajweb/help/respCode/respCodeList 输入应答码搜索解决方案
 *                          2) 咨询在线人工支持: open.unionpay.com注册一个用户并登陆在右上角点击“在线客服”,咨询人工QQ测试支持。
 * 交易说明:1)以后台通知或交易状态查询交易确定交易成功,前台通知不能作为判断成功的标准.
 *       2)交易状态查询交易(Form_6_5_Query)建议调用机制:前台类交易建议间隔(5分、10分、30分、60分、120分)发起交易查询,如果查询到结果成功,则不用再查询。(失败,处理中,查询不到订单均可能为中间状态)。也可以建议商户使用payTimeout(支付超时时间),过了这个时间点查询,得到的结果为最终结果。
 */
$order_no = $_REQUEST["order_no"];
$info = $orderMgr->getOrderByOrderNo($order_no);
$time = date("YmdHis");
$price = $info["price"] * 100;
$price = 1;
$params = array('version' => '5.0.0', 'encoding' => 'utf-8', 'certId' => getSignCertId(), 'txnType' => '01', 'txnSubType' => '01', 'bizType' => '000201', 'frontUrl' => SDK_FRONT_NOTIFY_URL, 'backUrl' => SDK_BACK_NOTIFY_URL, 'signMethod' => '01', 'channelType' => '08', 'accessType' => '0', 'currencyCode' => '156', 'merId' => "898111448161560", 'orderId' => $info["order_no"], 'txnTime' => $time, 'txnAmt' => $price);
sign($params);
$uri = SDK_FRONT_TRANS_URL;
$html_form = create_html($params, $uri);
echo $html_form;
开发者ID:alucard263096,项目名称:AMK,代码行数:31,代码来源:submit.php

示例11: set_smarty

<?php

include 'smarty/Smarty.class.php';
include 'index/common.func.php';
set_smarty();
load_lang_pack();
initial('index');
$smarty->display('index.php');
create_html($global['url']);
//新秀
开发者ID:jechiy,项目名称:xiu-cms,代码行数:10,代码来源:index.php

示例12: unionpay

 function unionpay()
 {
     include_once LIB_PATH . 'ORG/Payment/UnionPay/mobile/lib/common.php';
     include_once LIB_PATH . 'ORG/Payment/UnionPay/mobile/lib/SDKConfig.php';
     include_once LIB_PATH . 'ORG/Payment/UnionPay/mobile/lib/secureUtil.php';
     include_once LIB_PATH . 'ORG/Payment/UnionPay/mobile/lib/httpClient.php';
     include_once LIB_PATH . 'ORG/Payment/UnionPay/mobile/lib/log.class.php';
     $order_sn = $_GET['order_sn'];
     $token = $this->token;
     $wecha_id = $this->wechat_id;
     if (empty($order_sn)) {
         $this->error('没有订单号');
     }
     $trade = M('b2c_wingtrade')->where(array('order_sn' => $order_sn, 'token' => $token))->find();
     if ($trade && $trade['is_pay'] == '1') {
         $this->success('该订单已付款,不能重复付款!');
     }
     $pay_type = $_GET['pay_type'];
     if ($pay_type == '1') {
         $order = M('hotel_order')->where(array('sn' => $order_sn, 'token' => $token, 'order_status' => 3))->find();
     } elseif ($pay_type == '2') {
         $order = M('dine_order')->where(array('sn' => $order_sn, 'status' => 2))->find();
     } else {
         $order = M('b2c_order')->where(array('sn' => $order_sn, 'token' => $token, 'status' => 1))->find();
     }
     if (!$order) {
         $this->error('该订单不存在');
     }
     $payment_where = array('token' => $token, 'pay_code' => 'unionpay', 'enabled' => '1', 'pay_type' => $pay_type);
     if (!empty($this->branch_id)) {
         $payment_where['branch_id'] = $this->branch_id;
     }
     $payment = M('b2c_payment')->where($payment_where)->find();
     //$wingpay_config = unserialize($payment['pay_config']);
     if (empty($payment)) {
         $this->error('商家未设置银联支付方式!请联系商家客服!');
     }
     //PageRetUrl 返回支付后的商户网站页面
     $pagereturl = $_GET['front_url'];
     /**
      *	以下代码只是为了方便商户测试而提供的样例代码,商户可以根据自己需要,按照技术文档编写。该代码仅供参考
      */
     // 初始化日志
     $log = new PhpLog(SDK_LOG_FILE_PATH, "PRC", SDK_LOG_LEVEL);
     $log->LogInfo("============处理前台请求开始===============");
     if ($pay_type == '1') {
         $total_fee = intval($order['prepayment'] * 100);
     } elseif ($pay_type == '2') {
         $total_fee = intval($order['price'] * 100);
     } else {
         $total_fee = intval($order['price'] * 100);
     }
     $order_time = date('YmdHis');
     // 初始化日志
     $params = array('version' => '5.0.0', 'encoding' => 'UTF-8', 'certId' => getSignCertId(), 'txnType' => '01', 'txnSubType' => '01', 'bizType' => '000000', 'frontUrl' => SDK_FRONT_NOTIFY_URL, 'backUrl' => SDK_BACK_NOTIFY_URL, 'signMethod' => '01', 'channelType' => '08', 'accessType' => '0', 'merId' => '898340148160231', 'orderId' => $order_sn, 'txnTime' => $order_time, 'txnAmt' => $total_fee, 'currencyCode' => '156', 'defaultPayType' => '0001');
     // 签名
     sign($params);
     $data = array('token' => $token, 'order_sn' => $order_sn, 'is_pay' => '0', 'set_params' => serialize(array_merge($params, array('return_url' => $pagereturl, 'pay_type' => $pay_type))), 'update_time' => time());
     if (!$trade) {
         $data['create_time'] = time();
         M('b2c_wingtrade')->add($data);
     } else {
         M('b2c_wingtrade')->where(array('token' => $token, 'order_sn' => $order_sn, 'is_pay' => '0'))->save($data);
     }
     /*手机WAP支付方式*/
     // 前台请求地址
     $front_uri = SDK_FRONT_TRANS_URL;
     $log->LogInfo("前台请求地址为>" . $front_uri);
     // 构造 自动提交的表单
     $html_form = create_html($params, $front_uri);
     $log->LogInfo("-------前台交易自动提交表单>--begin----");
     $log->LogInfo($html_form);
     $log->LogInfo("-------前台交易自动提交表单>--end-------");
     $log->LogInfo("============处理前台请求 结束===========");
     echo $html_form;
 }
开发者ID:zhaoshengloveqingqing,项目名称:Wechat,代码行数:76,代码来源:ShopAction.class.php

示例13: get_code

 /**
  * 生成支付代码
  * @param   array   $order  订单信息
  * @param   array   $payment    支付方式信息
  */
 function get_code($order, $payment, $agent_type)
 {
     // 初始化变量
     if (!defined('EC_CHARSET')) {
         $charset = 'UTF-8';
     } else {
         $charset = strtoupper(EC_CHARSET);
     }
     // 初始化日志
     //global $log;
     $log = new PhpLog(SDK_LOG_FILE_PATH, "PRC", SDK_LOG_LEVEL);
     $log->LogInfo("============处理前台请求开始===============");
     // 初始化日志
     $orderNumber = $order['order_sn'] . $this->_formatSN($order['log_id']);
     $isVirtual = exist_virtual_card_goods($order['order_id']);
     $member_id = SDK_MEMBER_PC_REAL_ID;
     $cert_path = SDK_MEMBER_MOBILE_REAL_ID;
     $frontEndUrl = return_url(basename(__FILE__, '.php'));
     $backEndUrl = return_url(basename(__FILE__, '.php'));
     if ($agent_type == '07') {
         if ($isVirtual) {
             $member_id = SDK_MEMBER_PC_VIRTUAL_ID;
             $cert_path = SDK_SIGN_PC_VIRTUAL_PATH;
         } else {
             $member_id = SDK_MEMBER_PC_REAL_ID;
             $cert_path = SDK_SIGN_PC_REAL_PATH;
         }
         $params = array('version' => '5.0.0', 'encoding' => 'utf-8', 'certId' => getSignCertId($cert_path), 'txnType' => '01', 'txnSubType' => '01', 'bizType' => '000201', 'frontUrl' => $frontEndUrl, 'backUrl' => $backEndUrl, 'signMethod' => '01', 'channelType' => '07', 'accessType' => '0', 'merId' => $member_id, 'orderId' => $orderNumber, 'txnTime' => date('YmdHis'), 'txnAmt' => $order['order_amount'] * 100, 'currencyCode' => '156', 'defaultPayType' => '0001', 'reqReserved' => ' 透传信息');
     } else {
         if ($isVirtual) {
             $member_id = SDK_MEMBER_MOBILE_VIRTUAL_ID;
             $cert_path = SDK_SIGN_MOBILE_VIRTUAL_PATH;
         } else {
             $member_id = SDK_MEMBER_MOBILE_REAL_ID;
             $cert_path = SDK_SIGN_MOBILE_REAL_PATH;
         }
         $params = array('version' => '5.0.0', 'encoding' => 'utf-8', 'certId' => getSignCertId($cert_path), 'txnType' => '01', 'txnSubType' => '01', 'bizType' => '000201', 'frontUrl' => $frontEndUrl, 'backUrl' => $backEndUrl, 'signMethod' => '01', 'channelType' => '08', 'accessType' => '0', 'merId' => $member_id, 'orderId' => $orderNumber, 'txnTime' => date('YmdHis'), 'txnAmt' => $order['order_amount'] * 100, 'currencyCode' => '156', 'defaultPayType' => '0001', 'reqReserved' => ' 透传信息');
     }
     sign($params, $cert_path);
     // 前台请求地址
     $front_uri = SDK_FRONT_TRANS_URL;
     $log->LogInfo("前台请求地址为>" . $front_uri);
     // 构造 自动提交的表单
     $button = "<input type='submit' value='银联支付' />";
     $html_form = create_html($params, $front_uri, $button);
     $log->LogInfo("-------前台交易自动提交表单>--begin----");
     $log->LogInfo($html_form);
     $log->LogInfo("-------前台交易自动提交表单>--end-------");
     $log->LogInfo("============处理前台请求 结束===========");
     return $html_form;
     // $params = array(
     //        "version"            =>  '1.0.0',                      //接口版本
     //        "signMethod"         =>  'md5',                        //加密方式
     //        "charset"            =>  $charset,                     //编码
     //        "transType"          =>  '01',                         //交易类型
     //        "origQid"            =>  '',
     //        "merId"              =>  $merId,                       //收款账号
     //        "merAbbr"            =>  $merAbbr,                     //商户名称
     //        "acqCode"            =>  '',
     //        "merCode"            =>  '',
     //        "commodityUrl"       =>  '',                           //商品url
     //        "commodityName"      =>  '',                           //商品名字
     //        "commodityUnitPrice" =>  '',                           //商品单价
     //        "commodityQuantity"  =>  '',                           //商品数量
     //        "commodityDiscount"  =>  '',
     //        "transferFee"        =>  '',
     //        "orderNumber"        =>  $orderNumber,                 //订单号,必须唯一
     //        "orderAmount"        =>  $order['order_amount'] * 100, //交易金额 转化为分
     //        "orderCurrency"      =>  '156',                        //交易币种,CURRENCY_CNY=>人民币
     //        "orderTime"          =>  date('YmdHis'),               //交易时间, YYYYmmhhddHHMMSS
     //        "customerIp"         =>  $_SERVER['REMOTE_ADDR'],      //用户IP
     //        "customerName"       =>  '',
     //        "defaultPayType"     =>  '',
     //        "defaultBankNumber"  =>  '',
     //        "transTimeout"       =>  '',
     //        "frontEndUrl"        =>  $frontEndUrl,                 // 前台回调URL
     //        "backEndUrl"         =>  $backEndUrl,                  // 后台回调URL
     //        "merReserved"        =>  ''
     // );
     // $params['signature']    =$this->sign($params, $security_key,'md5');
     // $button = "<input type='submit' value='" . $GLOBALS['_LANG']['upop_button'] . "' />";
     // $html = $this->create_html($params,$front_pay_url,$button);
     // return $html;
     // 签名
 }
开发者ID:nanhuacrab,项目名称:ecshop,代码行数:90,代码来源:upop.php

示例14: obankpay

 public function obankpay()
 {
     $order = M('Order');
     $oid = $_GET['oid'];
     $map['oid'] = $oid;
     $map['userid'] = session('userid');
     $oinfo = $order->where($map)->find();
     if ($oinfo) {
         /**
          * 消费交易-前台
          */
         header('Content-type:text/html;charset=utf-8');
         // 初始化日志
         $log = new \PhpLog(SDK_LOG_FILE_PATH, "PRC", SDK_LOG_LEVEL);
         $log->LogInfo("============处理前台请求开始===============");
         // 初始化日志
         $params = array('version' => '5.0.0', 'encoding' => 'utf-8', 'certId' => getSignCertId(), 'txnType' => '02', 'txnSubType' => '01', 'bizType' => '000201', 'frontUrl' => SDK_PAY_FRONT_NOTIFY_URL, 'backUrl' => SDK_PAY_BACK_NOTIFY_URL, 'signMethod' => '01', 'channelType' => '07', 'accessType' => '0', 'merId' => '898110275120075', 'txnTime' => date('YmdHis'), 'currencyCode' => '156', 'defaultPayType' => '0001', 'reqReserved' => '支付订单、车辆押金');
         $params['orderId'] = $oinfo['order_sn'];
         $cdeposit = $oinfo['deposit'] + $oinfo['c_price'];
         $params['txnAmt'] = 10;
         //floatval($cdeposit) * 100;
         // 签名
         sign($params);
         // 前台请求地址
         $front_uri = SDK_FRONT_TRANS_URL;
         $log->LogInfo("前台请求地址为>" . $front_uri);
         // 构造 自动提交的表单
         $html_form = create_html($params, $front_uri);
         $log->LogInfo("-------前台交易自动提交表单>--begin----");
         $log->LogInfo($html_form);
         $log->LogInfo("-------前台交易自动提交表单>--end-------");
         $log->LogInfo("============处理前台请求 结束===========");
         echo $html_form;
     }
 }
开发者ID:huangkaijin,项目名称:clyy,代码行数:35,代码来源:BpayController.class.php

示例15: header

<?php

header('Content-type:text/html;charset=GBK');
include_once '../func/common.php';
include_once '../func/SDKConfig.php';
include_once '../func/secureUtil.php';
include_once '../func/encryptParams.php';
include_once '../func/httpClient.php';
include_once '../func/log.class.php';
/**
 *	预授权完成撤销交易
 */
/**
 *	以下代码只是为了方便商户测试而提供的样例代码,商户可以根据自己需要,按照技术文档编写。该代码仅供参考
 */
// 初始化日志
$log = new PhpLog(SDK_LOG_FILE_PATH, "PRC", SDK_LOG_LEVEL);
$log->LogInfo("===========处理后台请求开始============");
$params = array('version' => '5.0.0', 'encoding' => 'GBK', 'certId' => getSignCertId(), 'signMethod' => '01', 'txnType' => '33', 'txnSubType' => '00', 'bizType' => '000000', 'channelType' => '07', 'backUrl' => SDK_BACK_TRANS_URL, 'accessType' => '0', 'merId' => '898340183980105', 'subMerId' => '', 'subMerName' => '', 'subMerAbbr' => '', 'orderId' => date('YmdHis'), 'origQryId' => date('YmdHis'), 'txnTime' => date('YmdHis'), 'txnAmt' => '1', 'termId' => '', 'reqReserved' => '', 'reserved' => '', 'vpcTransData' => '');
// 签名
sign($params);
$log->LogInfo("后台请求地址为>" . SDK_BACK_TRANS_URL);
// 发送信息到后台
$result = sendHttpRequest($params, SDK_BACK_TRANS_URL);
$log->LogInfo("后台返回结果为>" . $result);
//返回结果展示
$result_arr = coverStringToArray($result);
$html = create_html($result_arr, SDK_BACK_NOTIFY_URL);
echo $html;
开发者ID:wjyGamedev,项目名称:xuezhiweb,代码行数:29,代码来源:AutnFinishUndo.php


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