Esempio n. 1
0
        /// <summary>
        /// 异步通知消息验证
        /// </summary>
        /// <param name="para">异步通知消息</param>
        /// <returns>验证结果</returns>
        public static bool VerifySignature(Dictionary <String, String> para)
        {
            String signature     = UpmpCore.BuildSignature(para);
            String respSignature = para[UpmpConfig.GetInstance().SIGNATURE];

            if (null != respSignature && respSignature.Equals(signature))
            {
                return(true);
            }
            return(false);
        }
Esempio n. 2
0
        /// <summary>
        /// 拼接请求字符串
        /// </summary>
        /// <param name="req"></param>
        /// <param name="resp"></param>
        /// <returns></returns>
        private static String BuildReq(Dictionary <String, String> req, Dictionary <String, String> resp)
        {
            // 生成签名结果
            String signature = UpmpCore.BuildSignature(req);

            // 签名结果与签名方式加入请求提交参数组中
            req[UpmpConfig.GetInstance().SIGNATURE]   = signature;
            req[UpmpConfig.GetInstance().SIGN_METHOD] = UpmpConfig.GetInstance().SIGN_TYPE;

            return(UpmpCore.CreateLinkString(req, false, true));
        }