本文整理汇总了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;
}
示例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;
}
示例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;
}
示例4: resultFilter
function resultFilter($array)
{
$list = array();
foreach ($array as $row) {
array_push($list, paraFilter($row));
}
return $list;
}
示例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;
$para_sort['sign_type'] = strtoupper(trim($this->alipay_config['sign_type']));
return $para_sort;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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));
}
示例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;
}