OSS.Clients.Pay icon indicating copy to clipboard operation
OSS.Clients.Pay copied to clipboard

支付成功后,返回的还是 false

Open qibunext opened this issue 7 years ago • 2 comments

/// <summary>
        ///  验证回调接口签名
        /// </summary>
        /// <param name="formDics">表单的字典值</param>
        /// <returns></returns>
        public ResultMo CheckCallBackSign(IDictionary<string, string> formDics)
        {
            if (!formDics.ContainsKey("sign"))
            {
                return new ResultMo(ResultTypes.ParaError,"未发现sign参数");
            }
            var sign = formDics["sign"];
            //var signType = formDics["sign_type"];

            formDics.Remove("sign");
            formDics.Remove("sign_type");

            var sortDics = new SortedDictionary<string, string>(formDics);

            var checkContent = string.Join("&", sortDics.Select(d => string.Concat(d.Key, "=", d.Value.UrlDecode())));

            var result = new ResultMo();
            CheckSign(checkContent, sign, result);
            return result;
        }

支付成功后,这里返回的还是 false 当前签名非法!为什么呢?

qibunext avatar Sep 13 '18 09:09 qibunext

这周我看下

KevinWG avatar Sep 17 '18 08:09 KevinWG

@KevinWG 谢谢

qibunext avatar Sep 17 '18 12:09 qibunext