Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
qibunext opened this issue Sep 13, 2018 · 2 comments
Open

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

qibunext opened this issue Sep 13, 2018 · 2 comments

Comments

@qibunext
Copy link

qibunext commented Sep 13, 2018

/// <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
当前签名非法!为什么呢?

@KevinWG
Copy link
Owner

KevinWG commented Sep 17, 2018

这周我看下

@qibunext
Copy link
Author

@KevinWG 谢谢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants