Ejemplo n.º 1
0
        /// <summary>
        /// 查询KEY列对应的数据信息
        /// </summary>
        /// <param name="KEY">列名称</param>
        /// <param name="machinCode">机器码</param>
        /// <param name="soft">软件名称</param>
        /// <returns></returns>
        public string GetValue(string KEY, string machinCode, string soft)
        {
            string Url  = "http://" + QrPayServerAddress + "/pages/onlineserial.aspx?TYPE=GetValue&KEY=" + KEY + "&machinCode=" + machinCode + "&soft=" + soft;
            string data = WebTool.getWebData(Url).Trim();

            if (!data.Equals(""))
            {
                data = Locker.Decrypt(data, machinCode + soft);
                data = WebTool.getNodeData(data, KEY, false);
            }

            return(data);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 获取获取ext附加参数中的信息
        /// </summary>
        /// <returns></returns>
        public string ExtInfo(string extKey)
        {
            string Url  = "http://" + QrPayServerAddress + "/pages/softinfo.aspx?TYPE=Select&softName=" + SoftName + "&key=ext";
            string data = WebTool.getWebData(Url).Trim();

            if (!data.Equals(""))
            {
                data  = Locker.Decrypt(data, SoftName); // 使用软件名称解密,加密的金额信息
                price = WebTool.getNodeData(data, "ext", false);
            }
            string extValue = WebTool.getNodeData(data, extKey, false);

            return(extValue);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 查询订单支付结果
        /// </summary>
        public static string OrderResult(PayParam param, string preOrderId)
        {
            string url      = param.SeverUrl + "?" + "TYPE=OrderResult" + "&" + "preOrderId=" + preOrderId;
            string paramStr = param.ToString();

            string data   = WebTool.getWebData(url);
            string result = WebTool.getNodeData(data, "Result", false).Trim();

            // 使用创建订单时的参数信息,解密查询结果
            if (paramStr != null && !paramStr.Equals(""))
            {
                result = Locker.Decrypt(result, preOrderId + paramStr);
            }

            return(result);
        }
Ejemplo n.º 4
0
        /// <summary>
        /// 获取软件的支付金额信息
        /// </summary>
        /// <returns></returns>
        public string getPrice()
        {
            //if (!price.Equals("")) return price;
            string Url  = "http://" + QrPayServerAddress + "/pages/softinfo.aspx?TYPE=Select&softName=" + SoftName + "&key=price";
            string data = WebTool.getWebData(Url).Trim();

            if (!data.Equals(""))
            {
                data  = Locker.Decrypt(data, SoftName); // 使用软件名称解密,加密的金额信息
                price = WebTool.getNodeData(data, "price", false);
            }
            if (price.Equals(""))
            {
                price = "10.00";
            }

            return(price);
        }