Esempio n. 1
0
        private string PIN; //PIN码
        //构造
        public PkiRNVParams()
        {
            userinfo        = new UserIdInfo();
            userinfo.idnum  = "";
            userinfo.idtype = "01";
            userinfo.name   = "";

            securityfactor = new SecurityFactor();
            securityfactor.encrypt_factor = EIdConfig.Encrypt_factor;
            securityfactor.sign_factor    = EIdConfig.Sign_factor;

            certid               = new EidCertId();
            certid.eid_issuer    = "";
            certid.eid_issuer_sn = "";
            certid.eid_sn        = "";
        }
Esempio n. 2
0
        /**
         * @Dictionary格式转化成url参数格式
         * @ return url格式串, 该串不包含sign字段值
         */
        private string ToUrl()
        {
            string buff = "";

            foreach (KeyValuePair <string, object> pair in m_values)
            {
                if (pair.Value == null)
                {
                    //Log.Error(this.GetType().ToString(), "WxPayData内部含有值为null的字段!");
                    // throw new WxPayException("WxPayData内部含有值为null的字段!");
                }
                //if (pair.Key == "user_id_info") //对象user处理
                //{
                //    UserIdInfo o = (UserIdInfo)pair.Value;
                //    buff += "user_id_info=idnum=" + o.idnum + "&idtype=" + o.idtype + "&name=" + o.name + "&";
                //}
                else if (pair.Key == "security_factor") //对象security_factor处理
                {
                    SecurityFactor o = (SecurityFactor)pair.Value;
                    buff += "security_factor=encrypt_factor=" + o.encrypt_factor + "&sign_factor=" + o.sign_factor + "&";
                }
                else if (pair.Key == "eid_cert_id") //对象eid_cert_id处理
                {
                    EidCertId o = (EidCertId)pair.Value;
                    buff += "eid_cert_id=eid_issuer=" + o.eid_issuer + "&eid_issuer_sn=" + o.eid_issuer_sn + "&eid_sn=" + o.eid_sn + "&";
                }
                else
                {
                    if (pair.Key != "sign" && pair.Value.ToString() != "")
                    {
                        buff += pair.Key + "=" + pair.Value + "&";
                    }
                }
            }
            buff = buff.Trim('&');
            return(buff);
        }