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;
}

你可能感兴趣的:(php微信支付回调验证签名)