Exemplo n.º 1
0
        /// <summary>
        /// 生成 订单详情 (package)
        /// </summary>
        /// <returns></returns>
        public string GetCftPackage()
        {
            if ("" == PartnerKey)
            {
                throw new SDKRuntimeException("密钥不能为空!");
            }
            string unSignParaString = CommonUtil.FormatBizQueryParaMap(parameters,
                                                                       false);
            string paraString = CommonUtil.FormatBizQueryParaMap(parameters, true);

            return(paraString + "&sign="
                   + MD5SignUtil.Sign(unSignParaString, PartnerKey));
        }
Exemplo n.º 2
0
        /// <summary>
        /// MD5签名
        /// </summary>
        /// <returns></returns>
        public string GetCftPackage(Dictionary <string, string> bizObj)
        {
            if (string.IsNullOrEmpty(Key))
            {
                throw new Exception("Key为空!");
            }

            string unSignParaString = CommonUtil.FormatBizQueryParaMapForUnifiedPay(bizObj);
            string sign             = MD5SignUtil.Sign(unSignParaString, Key);

            //StringBuilder sb = new StringBuilder();
            //sb.AppendFormat("unSignParaString:{0}|sign:{1}", unSignParaString, sign);
            //Core.Globals.WriteText(sb);
            return(sign);
        }