打你一下

php微信支付回调验证签名

function verifySign($params,$apikey="PvXTgIhJOkRZnfOs9JQ7SANnV5KfsHTJ") {
ksort($params);
$string="";
foreach ($params as $k => $v) {

if($k != "sign" && $v != "" && !is_array($v)){
$string .= $k . "=" . $v . "&";
}
}
$string = $string . "key=".$apikey;
$string = md5($string);
$result = strtoupper($string);
return $result;
}

posted on 2020-06-27 16:10  打你一下  阅读(1534)  评论(0编辑  收藏  举报

导航