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


PHP argSort函数代码示例

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


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

示例1: 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

示例2: 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

示例3: 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

示例4: 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

示例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;
     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

示例7: 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

示例8: 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

示例9: 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

示例10: 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

示例11: createLinkString

/**
 * 把请求要素按照“参数=参数值”的模式用“&”字符拼接成字符串
 * @param para 请求要素
 * @param sort 是否需要根据key值作升序排列
 * @param encode 是否需要URL编码
 * @return 拼接成的字符串
 */
function createLinkString($para, $sort, $encode)
{
    $linkString = "";
    if ($sort) {
        $para = argSort($para);
    }
    while (list($key, $value) = each($para)) {
        if ($encode) {
            $value = urlencode($value);
        }
        $linkString .= $key . upmp_config::QSTRING_EQUAL . $value . upmp_config::QSTRING_SPLIT;
    }
    //去掉最后一个&字符
    $linkString = substr($linkString, 0, count($linkString) - 2);
    return $linkString;
}
开发者ID:zhaoshengloveqingqing,项目名称:Wechat,代码行数:23,代码来源:upmp_core.php

示例12: 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

示例13: getSignVeryfy

 /**
  * 获取返回时的签名验证结果
  * @param $para_temp 通知返回来的参数数组
  * @param $sign 返回的签名结果
  * @return 签名验证结果
  */
 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:renlong567,项目名称:43168,代码行数:24,代码来源:alipay_notify.class.php

示例14: 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

示例15: 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->llpay_config['sign_type']));
		foreach ($para_sort as $key => $value) {
			$para_sort[$key] = $value;
		}
		if('3' == $this->llpay_config['app_request']) {
						if('api' == WEB_BASE_ENV_DFS::$APPNAME) {
				return json_encode($para_sort);
			} else {
				return urldecode(json_encode($para_sort));
			}
		} else {
			return $para_sort;
		}
		
	}
开发者ID:pf5512,项目名称:phpstudy,代码行数:20,代码来源:llpay_submit.class.php


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