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


PHP paraFilter函数代码示例

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


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

示例1: getSignVeryfy

 function getSignVeryfy($para_temp, $sign, $isSort)
 {
     $para = paraFilter($para_temp);
     if ($isSort) {
         $para = argSort($para);
     } else {
         $para = $this->sortNotifyPara($para);
     }
     $prestr = createLinkstring($para);
     $isSgin = false;
     switch (strtoupper(trim($this->alipay_config['sign_type']))) {
         case "MD5":
             $isSgin = md5Verify($prestr, $sign, $this->alipay_config['key']);
             break;
         case "RSA":
             $isSgin = rsaVerify($prestr, trim($this->alipay_config['ali_public_key_path']), $sign);
             break;
         case "0001":
             $isSgin = rsaVerify($prestr, trim($this->alipay_config['ali_public_key_path']), $sign);
             break;
         default:
             $isSgin = false;
     }
     return $isSgin;
 }
开发者ID:keyu199314,项目名称:php,代码行数:25,代码来源:alipay_notify.class.php

示例2: getMysign

 function getMysign($para_temp)
 {
     $para_filter = paraFilter($para_temp);
     $para_sort = argSort($para_filter);
     $mysign = buildMysign($para_sort, trim($this->aliapy_config['key']), strtoupper(trim($this->aliapy_config['sign_type'])));
     return $mysign;
 }
开发者ID:keyu199314,项目名称:php,代码行数:7,代码来源:alipay_notify.class.php

示例3: buildRequestPara

 /**
  * 生成要请求给支付宝的参数数组
  * @param $para_temp 请求前的参数数组
  * @return 要请求的参数数组
  */
 public function buildRequestPara($para_temp)
 {
     if (strtoupper(trim($this->alipay_config['sign_type'])) == 'RSA') {
         //除去待签名参数数组中的空值和签名参数
         $para_filter = paraFilter($para_temp, 2);
         //对待签名参数数组排序
         $para_sort = argSort($para_filter);
         //生成签名结果
         $mysign = $this->buildRequestMysign($para_sort);
         //签名结果与签名方式加入请求提交参数组中
         $para_sort['sign'] = $mysign;
         //20161124  使用最官方的新sdk注意:sign_type字段需要参加签名  生成的签名不要urlencode 放在数组里再进行urlencode
     } elseif (strtoupper(trim($this->alipay_config['sign_type'])) == 'MD5') {
         //除去待签名参数数组中的空值和签名参数
         $para_filter = paraFilter($para_temp);
         //对待签名参数数组排序
         $para_sort = argSort($para_filter);
         //生成签名结果
         $mysign = $this->buildRequestMysign($para_sort);
         //签名结果与签名方式加入请求提交参数组中
         $para_sort['sign'] = $mysign;
         $para_sort['sign_type'] = strtoupper(trim($this->alipay_config['sign_type']));
     }
     return $para_sort;
 }
开发者ID:medz,项目名称:thinksns-4,代码行数:30,代码来源:alipay_submit.class.php

示例4: resultFilter

function resultFilter($array)
{
    $list = array();
    foreach ($array as $row) {
        array_push($list, paraFilter($row));
    }
    return $list;
}
开发者ID:tekintian,项目名称:Codeigniter_Restful_API,代码行数:8,代码来源:check_helper.php

示例5: buildRequestPara

 function buildRequestPara($para_temp, $aliapy_config)
 {
     $para_filter = paraFilter($para_temp);
     $para_sort = argSort($para_filter);
     $mysign = buildMysign($para_sort, trim($aliapy_config['key']), strtoupper(trim($aliapy_config['sign_type'])));
     $para_sort['sign'] = $mysign;
     $para_sort['sign_type'] = strtoupper(trim($aliapy_config['sign_type']));
     return $para_sort;
 }
开发者ID:keyu199314,项目名称:php,代码行数:9,代码来源:alipay_submit.class.php

示例6: buildRequestPara

 function buildRequestPara($para_temp)
 {
     $para_filter = paraFilter($para_temp);
     $para_sort = argSort($para_filter);
     $mysign = $this->buildRequestMysign($para_sort);
     $para_sort['sign'] = $mysign;
     $para_sort['sign_type'] = strtoupper(trim($this->alipay_config['sign_type']));
     return $para_sort;
 }
开发者ID:huangbinzd,项目名称:kppwGit,代码行数:9,代码来源:alipay_submit.class.php

示例7: buildRequestPara

 /**
  * 生成要请求的参数数组
  * @param $para_temp 请求前的参数数组
  * @return 要请求的参数数组
  */
 public function buildRequestPara($para_temp)
 {
     //除去待签名参数数组中的空值
     $para = paraFilter($para_temp);
     //生成签名结果
     $mysign = $this->buildRequestMysign($para);
     //--------这里保留了空值参数--------
     //签名结果与签名方式加入请求提交参数组中
     $para_temp['signMsg'] = $mysign;
     return $para_temp;
 }
开发者ID:lunnlew,项目名称:Norma_Code,代码行数:16,代码来源:submit.class.php

示例8: buildRequestPara

 function buildRequestPara($para_temp)
 {
     $para_filter = paraFilter($para_temp);
     $para_sort = argSort($para_filter);
     $mysign = $this->buildRequestMysign($para_sort);
     $para_sort['sign'] = $mysign;
     if ($para_sort['service'] != 'alipay.wap.trade.create.direct' && $para_sort['service'] != 'alipay.wap.auth.authAndExecute') {
         $para_sort['sign_type'] = strtoupper(trim($this->alipay_config['sign_type']));
     }
     return $para_sort;
 }
开发者ID:keyu199314,项目名称:php,代码行数:11,代码来源:alipay_submit.class.php

示例9: buildRequestPara

 /**
  * 生成要请求给集付宝的参数数组
  * @param $para_temp 请求前的参数数组
  * @return 要请求的参数数组
  */
 function buildRequestPara($para_temp)
 {
     //除去待签名参数数组中的空值和签名参数
     $para_filter = paraFilter($para_temp);
     //对待签名参数数组排序
     $para_sort = argSort($para_filter);
     //生成签名结果
     $mysign = $this->buildRequestMysign($para_sort);
     //签名结果与签名方式加入请求提交参数组中
     $para_sort['sign'] = $mysign;
     return $para_sort;
 }
开发者ID:eliu03,项目名称:fanweP2P,代码行数:17,代码来源:jfb_submit.class.php

示例10: buildRequestPara

 /**
  * 生成要请求给支付宝的参数数组
  * @param $para_temp 请求前的参数数组
  * @param $aliapy_config 基本配置信息数组
  * @return 要请求的参数数组
  */
 function buildRequestPara($para_temp, $aliapy_config)
 {
     //除去待签名参数数组中的空值和签名参数
     $para_filter = paraFilter($para_temp);
     //对待签名参数数组排序
     $para_sort = argSort($para_filter);
     //生成签名结果
     $mysign = buildMysign($para_sort, trim($aliapy_config['key']), strtoupper(trim($aliapy_config['sign_type'])));
     //签名结果与签名方式加入请求提交参数组中
     $para_sort['sign'] = $mysign;
     $para_sort['sign_type'] = strtoupper(trim($aliapy_config['sign_type']));
     return $para_sort;
 }
开发者ID:pancke,项目名称:yyaf,代码行数:19,代码来源:alipay_submit.class.php

示例11: buildRequestPara

 /**
  * 生成要请求给支付宝的参数数组
  * @param $para_temp 请求前的参数数组
  * @return 要请求的参数数组
  */
 function buildRequestPara($para_temp)
 {
     //除去待签名参数数组中的空值和签名参数
     $para_filter = paraFilter($para_temp);
     //对待签名参数数组排序
     $para_sort = argSort($para_filter);
     //生成签名结果
     $mysign = $this->buildRequestMysign($para_sort);
     //签名结果与签名方式加入请求提交参数组中
     $para_sort['sign'] = $mysign;
     $para_sort['sign_type'] = strtoupper(trim($this->alipay_config['sign_type']));
     return $para_sort;
 }
开发者ID:iyakexi,项目名称:app-pay-server-demo,代码行数:18,代码来源:alipay_submit.class.php

示例12: getSignVeryfy

 public function getSignVeryfy($para_temp, $sign)
 {
     $para_filter = paraFilter($para_temp);
     $para_sort = argSort($para_filter);
     $prestr = createLinkstring($para_sort);
     $isSgin = false;
     switch (strtoupper(trim($this->alipay_config["sign_type"]))) {
         case "MD5":
             $isSgin = md5Verify($prestr, $sign, $this->alipay_config["key"]);
             break;
         default:
             $isSgin = false;
     }
     return $isSgin;
 }
开发者ID:belerweb,项目名称:pigcms,代码行数:15,代码来源:alipay_notify.class.php

示例13: getSignVeryfy

 /**
  * 获取返回时的签名验证结果
  * @param $para_temp 通知返回来的参数数组
  * @param $sign 返回的签名结果
  * @return 签名验证结果
  */
 public function getSignVeryfy($para_temp, $sign)
 {
     //除去待签名参数数组中的空值
     $para = paraFilter($para_temp);
     //把数组所有元素,按照“参数=参数值”的模式用“&”字符拼接成字符串
     $prestr = createLinkstring($para);
     $MAC = base64_decode($sign);
     $fp = fopen(dirname(__FILE__) . "/99bill[1].cert.rsa.20140803.cer", "r");
     $cert = fread($fp, 8192);
     fclose($fp);
     $pubkeyid = openssl_get_publickey($cert);
     $isSgin = false;
     $isSgin = openssl_verify($trans_body, $MAC, $pubkeyid);
     return $isSgin;
 }
开发者ID:lunnlew,项目名称:Norma_Code,代码行数:21,代码来源:notify.class.php

示例14: buildRequestPara

 /**
  * 生成要请求给连连支付的参数数组
  * @param $para_temp 请求前的参数数组
  * @return 要请求的参数数组
  */
 function buildRequestPara($para_temp)
 {
     //除去待签名参数数组中的空值和签名参数
     $para_filter = paraFilter($para_temp);
     //对待签名参数数组排序
     $para_sort = argSort($para_filter);
     //生成签名结果
     $mysign = $this->buildRequestMysign($para_sort);
     //签名结果与签名方式加入请求提交参数组中
     $para_sort['sign'] = $mysign;
     $para_sort['sign_type'] = strtoupper(trim($this->llpay_config['sign_type']));
     foreach ($para_sort as $key => $value) {
         $para_sort[$key] = urlencode($value);
     }
     return urldecode(json_encode($para_sort));
 }
开发者ID:shuai959980629,项目名称:TTDV1,代码行数:21,代码来源:llpay_submit.class.php

示例15: getSign

 /**
  * 获取请求签名
  * @param $para_temp 请求的参数数组
  * @return 签名
  */
 public function getSign($para_temp)
 {
     //除去待签名参数数组中的空值和签名参数
     $para_filter = paraFilter($para_temp);
     //对待签名参数数组排序
     $para_sort = argSort($para_filter);
     //把数组所有元素,按照“参数=参数值”的模式用“&”字符拼接成字符串
     $prestr = createLinkstring($para_sort);
     $isSgin = false;
     switch (strtoupper(trim($this->alipay_config['sign_type']))) {
         case "RSA":
             $isSgin = rsaSign($prestr, trim($this->alipay_config['private_key_path']));
             break;
         default:
             $isSgin = false;
     }
     return $isSgin;
 }
开发者ID:jkzleond,项目名称:alhelp_api,代码行数:23,代码来源:AlipayController.class.php


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