本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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));
}
示例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;
}
示例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;
}
示例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;
}
}