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


PHP coverStringToArray函数代码示例

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


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

示例1: cx

 public function cx($conf)
 {
     $params = array('version' => '5.0.0', 'encoding' => 'utf-8', 'certId' => getSignCertId(), 'signMethod' => '01', 'txnType' => '00', 'txnSubType' => '00', 'bizType' => '000000', 'accessType' => '0', 'channelType' => '07', 'orderId' => $conf['ordernumber'], 'merId' => '898110248160161', 'txnTime' => date("YmdHis", strtotime($conf['addtime'])));
     // 签名
     sign($params);
     // 发送信息到后台
     $result = sendHttpRequest($params, SDK_SINGLE_QUERY_URL);
     //返回结果展示
     $result_arr = coverStringToArray($result);
     $insert = array();
     $insert['ordernumber'] = $conf['ordernumber'];
     $insert['fqtime'] = $conf['addtime'];
     $insert['ylnumber'] = isset($result_arr['queryId']) ? $result_arr['queryId'] : 0;
     $insert['yltime'] = isset($result_arr['traceTime']) ? $result_arr['traceTime'] : 0;
     $insert['ylstatus'] = $conf['cztype'];
     $insert['cxtime'] = date("Y-m-d  H:i:s");
     $insert['cxstatus'] = $result_arr['respCode'];
     $insert['cxmiaosu'] = $result_arr['respMsg'];
     $insert['userId'] = $conf['userId'];
     $insert['origRespCode'] = isset($result_arr['origRespCode']) ? $result_arr['origRespCode'] : 0;
     $insert['origRespMsg'] = isset($result_arr['origRespMsg']) ? $result_arr['origRespMsg'] : 0;
     $this->db->insert("yinlian", $insert);
     if ($this->db->insert_id() > 0) {
         $this->db->query("update  `cz`  set  `cl`=1  where   logId=" . $conf['logId']);
     }
 }
开发者ID:q546530715,项目名称:fenzhi-git,代码行数:26,代码来源:yinlian.php

示例2: getTN

 function getTN($order)
 {
     $this->params['orderId'] = $order['OrderID'];
     $this->params['txnTime'] = date('YmdHis');
     $this->params['txnAmt'] = $order['OrderPrice'] * 100;
     $this->params['reqReserved'] = base64_encode(json_encode(array('pay_type' => 3)));
     $params = $this->params;
     sign($params);
     $result = sendHttpRequest($params, SDK_App_Request_Url);
     $result_arr = coverStringToArray($result);
     //        echo '<pre>';
     //        print_r($params);
     //        print_r($result_arr);
     if (verify($result_arr)) {
         return $result_arr["tn"];
     } else {
         return false;
     }
 }
开发者ID:onlineshine,项目名称:myzf,代码行数:19,代码来源:unionpay.php

示例3: 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/httpClient.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(), 'signMethod' => '01', 'txnType' => '03', 'txnSubType' => '00', 'bizType' => '000201', 'accessType' => '0', 'channelType' => '07', 'orderId' => date('YmdHis'), 'merId' => '888888888888888', 'origQryId' => '201502281110005523968', 'txnTime' => date('YmdHis'), 'txnAmt' => '100', 'backUrl' => SDK_BACK_NOTIFY_URL, 'reqReserved' => ' 透传信息');
// 签名
sign($params);
echo "请求:" . getRequestParamString($params);
$log->LogInfo("后台请求地址为>" . SDK_BACK_TRANS_URL);
// 发送信息到后台
$result = sendHttpRequest($params, SDK_BACK_TRANS_URL);
$log->LogInfo("后台返回结果为>" . $result);
echo "应答:" . $result;
//返回结果展示
$result_arr = coverStringToArray($result);
echo verify($result_arr) ? '验签成功' : '验签失败';
?>

开发者ID:184609680,项目名称:wcy_O2O_95180,代码行数:29,代码来源:Form_6_7_3_AuthFinish.php

示例4: fopen

<?php

include_once './func/SDKConfig.php';
include_once './func/common.php';
include_once './custom_func.php';
$f = fopen($CALLBACK_TEST_FILE, 'w+');
fwrite($f, file_get_contents('php://input'));
fclose($f);
$post_data = coverStringToArray(file_get_contents('php://input'));
if ($post_data['reqReserved'] != get_callback_reserved_string()) {
    die('Authentication failed!');
}
if ($post_data['txnType'] == '01' && $post_data['txnSubType'] == '01') {
    if ($post_data['respCode'] == '00') {
        pay_succeeded($post_data);
    } else {
        pay_failed($post_data);
    }
}
echo file_get_contents('php://input');
开发者ID:Chion82,项目名称:Unionpay_PHP_API,代码行数:20,代码来源:callback.php

示例5: cancelpay

 public function cancelpay($oid)
 {
     $order = M('Order');
     $map['oid'] = $oid;
     $oinfo = $order->where($map)->find();
     if ($oinfo['paytype'] == '0') {
         $log = new \PhpLog(SDK_LOG_FILE_PATH, "PRC", SDK_LOG_LEVEL);
         $log->LogInfo("============处理前台请求开始===============");
         // 初始化日志
         $params = array('version' => '5.0.0', 'encoding' => 'utf-8', 'certId' => getSignCertId(), 'signMethod' => '01', 'txnType' => '32', 'txnSubType' => '00', 'bizType' => '000201', 'accessType' => '0', 'channelType' => '07', 'orderId' => build_order_no(), 'merId' => '898110275120075', 'txnTime' => date('YmdHis'), 'backUrl' => SDK_CDE_BACK_NOTIFY_URL, 'reqReserved' => ' 透传信息');
         $params['origQryId'] = $oinfo['trade_no'];
         $cdeposit = $oinfo['deposit'] + $oinfo['c_price'];
         $params['txnAmt'] = 10;
         //floatval($cdeposit) * 100;
         sign($params);
         //echo "请求:" . getRequestParamString ( $params );
         $log->LogInfo("后台请求地址为>" . SDK_BACK_TRANS_URL);
         // 发送信息到后台
         $result = sendHttpRequest($params, SDK_BACK_TRANS_URL);
         $log->LogInfo("后台返回结果为>" . $result);
         //echo "应答:" . $result;
         //返回结果展示
         $result_arr = coverStringToArray($result);
         if (verify($result_arr)) {
             if ($result_arr['respCode'] == '00') {
                 return true;
             } else {
                 return false;
             }
         } else {
             return false;
         }
     } else {
         return false;
     }
 }
开发者ID:huangkaijin,项目名称:clyy,代码行数:36,代码来源:BpayController.class.php


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