|
@@ -512,47 +512,59 @@ namespace MySystem
|
|
}
|
|
}
|
|
|
|
|
|
// 设置费率
|
|
// 设置费率
|
|
- public string SetLiSFee(string sn, decimal serviceFee = 0.6M)
|
|
|
|
|
|
+ public string SetLiSFee(string sn, string merchNo, string serviceRate = "0.6", string serviceFee = "0")
|
|
{
|
|
{
|
|
Dictionary<string, object> dic = new Dictionary<string, object>();
|
|
Dictionary<string, object> dic = new Dictionary<string, object>();
|
|
dic.Add("agentId", LiSAgentId);
|
|
dic.Add("agentId", LiSAgentId);
|
|
dic.Add("deviceSn", sn);
|
|
dic.Add("deviceSn", sn);
|
|
|
|
+ dic.Add("merchNo", merchNo);
|
|
List<Dictionary<string, object>> feeList = new List<Dictionary<string, object>>();
|
|
List<Dictionary<string, object>> feeList = new List<Dictionary<string, object>>();
|
|
Dictionary<string, object> item = new Dictionary<string, object>();
|
|
Dictionary<string, object> item = new Dictionary<string, object>();
|
|
item.Add("feeCalcType", "M5");
|
|
item.Add("feeCalcType", "M5");
|
|
item.Add("fixed", "0");
|
|
item.Add("fixed", "0");
|
|
|
|
+ item.Add("rate", serviceRate);
|
|
|
|
+ feeList.Add(item);
|
|
|
|
+ item = new Dictionary<string, object>();
|
|
|
|
+ item.Add("feeCalcType", "T0");
|
|
|
|
+ item.Add("fixed", "1");
|
|
item.Add("rate", serviceFee);
|
|
item.Add("rate", serviceFee);
|
|
feeList.Add(item);
|
|
feeList.Add(item);
|
|
dic.Add("feeList", feeList);
|
|
dic.Add("feeList", feeList);
|
|
dic.Add("signMethod", "02");
|
|
dic.Add("signMethod", "02");
|
|
- string content = LiSAgentId + sn + "M50" + serviceFee + "02";
|
|
|
|
|
|
+ string content = LiSAgentId + merchNo + sn + "M50" + serviceFee + "02";
|
|
string signstr = LiSSign(content);
|
|
string signstr = LiSSign(content);
|
|
dic.Add("signData", signstr);
|
|
dic.Add("signData", signstr);
|
|
string req = Newtonsoft.Json.JsonConvert.SerializeObject(dic);
|
|
string req = Newtonsoft.Json.JsonConvert.SerializeObject(dic);
|
|
function.WriteLog("请求参数:" + req, "设置立刷云电签费率");
|
|
function.WriteLog("请求参数:" + req, "设置立刷云电签费率");
|
|
- string result = PostWebRequest(LiSReqUrl + "FEE003", req, new Dictionary<string, string>());
|
|
|
|
|
|
+ string result = PostWebRequest(LiSReqUrl + "FEE002", req, new Dictionary<string, string>());
|
|
function.WriteLog("返回报文:" + result + "\n\n\n", "设置立刷云电签费率");
|
|
function.WriteLog("返回报文:" + result + "\n\n\n", "设置立刷云电签费率");
|
|
return result;
|
|
return result;
|
|
}
|
|
}
|
|
- public string SetLiSWeFee(string sn, decimal serviceFee = 0.6M)
|
|
|
|
|
|
+ public string SetLiSWeFee(string sn, string merchNo, string serviceRate = "0.6", string serviceFee = "0")
|
|
{
|
|
{
|
|
Dictionary<string, object> dic = new Dictionary<string, object>();
|
|
Dictionary<string, object> dic = new Dictionary<string, object>();
|
|
dic.Add("agentId", LiSWeAgentId);
|
|
dic.Add("agentId", LiSWeAgentId);
|
|
dic.Add("deviceSn", sn);
|
|
dic.Add("deviceSn", sn);
|
|
|
|
+ dic.Add("merchNo", merchNo);
|
|
List<Dictionary<string, object>> feeList = new List<Dictionary<string, object>>();
|
|
List<Dictionary<string, object>> feeList = new List<Dictionary<string, object>>();
|
|
Dictionary<string, object> item = new Dictionary<string, object>();
|
|
Dictionary<string, object> item = new Dictionary<string, object>();
|
|
item.Add("feeCalcType", "M5");
|
|
item.Add("feeCalcType", "M5");
|
|
item.Add("fixed", "0");
|
|
item.Add("fixed", "0");
|
|
item.Add("rate", serviceFee);
|
|
item.Add("rate", serviceFee);
|
|
feeList.Add(item);
|
|
feeList.Add(item);
|
|
|
|
+ item = new Dictionary<string, object>();
|
|
|
|
+ item.Add("feeCalcType", "T0");
|
|
|
|
+ item.Add("fixed", "1");
|
|
|
|
+ item.Add("rate", serviceFee);
|
|
|
|
+ feeList.Add(item);
|
|
dic.Add("feeList", feeList);
|
|
dic.Add("feeList", feeList);
|
|
dic.Add("signMethod", "02");
|
|
dic.Add("signMethod", "02");
|
|
- string content = LiSWeAgentId + sn + "M50" + serviceFee + "02";
|
|
|
|
|
|
+ string content = LiSWeAgentId + merchNo + sn + "M50" + serviceFee + "02";
|
|
string signstr = LiSWeSign(content);
|
|
string signstr = LiSWeSign(content);
|
|
dic.Add("signData", signstr);
|
|
dic.Add("signData", signstr);
|
|
string req = Newtonsoft.Json.JsonConvert.SerializeObject(dic);
|
|
string req = Newtonsoft.Json.JsonConvert.SerializeObject(dic);
|
|
function.WriteLog("请求参数:" + req, "设置立刷微电签费率");
|
|
function.WriteLog("请求参数:" + req, "设置立刷微电签费率");
|
|
- string result = PostWebRequest(LiSReqUrl + "FEE003", req, new Dictionary<string, string>());
|
|
|
|
|
|
+ string result = PostWebRequest(LiSReqUrl + "FEE002", req, new Dictionary<string, string>());
|
|
function.WriteLog("返回报文:" + result + "\n\n\n", "设置立刷微电签费率");
|
|
function.WriteLog("返回报文:" + result + "\n\n\n", "设置立刷微电签费率");
|
|
return result;
|
|
return result;
|
|
}
|
|
}
|