jsapi支付接口回调验签结果总是false 是什么原因呢
//certPublickey 解密后平台证书的公钥
// sign 接口应答签名
//s 接口应答字符串(应答时间戳\n应答随机串\n应答主体\n)
public bool VerifySign(string certPublickey, string sign, string s)
{
writeLog(certPublickey+",,"+sign+",,"+s);
X509Certificate2 publicCert = new X509Certificate2(Encoding.UTF8.GetBytes(certPublickey));
RSACryptoServiceProvider publicKey = (RSACryptoServiceProvider)publicCert.PublicKey.Key;
SHA256CryptoServiceProvider sHA = new SHA256CryptoServiceProvider();
return publicKey.VerifyData(Encoding.UTF8.GetBytes(s), sHA, Convert.FromBase64String(sign));
}