|
@@ -36,8 +36,8 @@ namespace MySystem
|
|
|
|
|
|
|
|
public string BoxServiceFee(string SnList, string ServiceFee)
|
|
public string BoxServiceFee(string SnList, string ServiceFee)
|
|
|
{
|
|
{
|
|
|
- function.WriteLog(DateTime.Now.ToString(), "设置盒易付机具服务费");
|
|
|
|
|
- function.WriteLog(SnList, "设置盒易付机具服务费");
|
|
|
|
|
|
|
+ Utils.WriteLog(DateTime.Now.ToString(), "设置盒易付机具服务费");
|
|
|
|
|
+ Utils.WriteLog(SnList, "设置盒易付机具服务费");
|
|
|
Dictionary<string, object> reqdic = new Dictionary<string, object>();
|
|
Dictionary<string, object> reqdic = new Dictionary<string, object>();
|
|
|
string batchNo = DateTime.Now.ToString("yyyyMMddHHmmssfff") + function.get_Random(8);
|
|
string batchNo = DateTime.Now.ToString("yyyyMMddHHmmssfff") + function.get_Random(8);
|
|
|
|
|
|
|
@@ -54,11 +54,11 @@ namespace MySystem
|
|
|
|
|
|
|
|
Dictionary<string, string> headdic = GetHeader(reqdic);
|
|
Dictionary<string, string> headdic = GetHeader(reqdic);
|
|
|
string head = Newtonsoft.Json.JsonConvert.SerializeObject(headdic);
|
|
string head = Newtonsoft.Json.JsonConvert.SerializeObject(headdic);
|
|
|
- function.WriteLog("请求头\n" + head, "设置盒易付机具服务费");
|
|
|
|
|
- function.WriteLog("请求参数\n" + req, "设置盒易付机具服务费");
|
|
|
|
|
- function.WriteLog("请求地址:" + BoxRequestUrl + "/inst/register/terms", "设置盒易付机具服务费");
|
|
|
|
|
|
|
+ Utils.WriteLog("请求头\n" + head, "设置盒易付机具服务费");
|
|
|
|
|
+ Utils.WriteLog("请求参数\n" + req, "设置盒易付机具服务费");
|
|
|
|
|
+ Utils.WriteLog("请求地址:" + BoxRequestUrl + "/inst/register/terms", "设置盒易付机具服务费");
|
|
|
string result = PostWebRequest(BoxRequestUrl + "/inst/register/terms", req, headdic);
|
|
string result = PostWebRequest(BoxRequestUrl + "/inst/register/terms", req, headdic);
|
|
|
- function.WriteLog("返回\n" + result + "\n\n", "设置盒易付机具服务费");
|
|
|
|
|
|
|
+ Utils.WriteLog("返回\n" + result + "\n\n", "设置盒易付机具服务费");
|
|
|
return result;
|
|
return result;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -244,9 +244,9 @@ namespace MySystem
|
|
|
string ret = string.Empty;
|
|
string ret = string.Empty;
|
|
|
try
|
|
try
|
|
|
{
|
|
{
|
|
|
- function.WriteLog(DateTime.Now.ToString(), "请求开店宝API日志");
|
|
|
|
|
- function.WriteLog(postUrl, "请求开店宝API日志");
|
|
|
|
|
- function.WriteLog(paramData, "请求开店宝API日志");
|
|
|
|
|
|
|
+ Utils.WriteLog(DateTime.Now.ToString(), "请求开店宝API日志");
|
|
|
|
|
+ Utils.WriteLog(postUrl, "请求开店宝API日志");
|
|
|
|
|
+ Utils.WriteLog(paramData, "请求开店宝API日志");
|
|
|
byte[] postData = System.Text.Encoding.UTF8.GetBytes(paramData);
|
|
byte[] postData = System.Text.Encoding.UTF8.GetBytes(paramData);
|
|
|
// 设置提交的相关参数
|
|
// 设置提交的相关参数
|
|
|
System.Net.HttpWebRequest request = System.Net.WebRequest.Create(postUrl) as System.Net.HttpWebRequest;
|
|
System.Net.HttpWebRequest request = System.Net.WebRequest.Create(postUrl) as System.Net.HttpWebRequest;
|
|
@@ -277,7 +277,7 @@ namespace MySystem
|
|
|
srcString = reader.ReadToEnd();
|
|
srcString = reader.ReadToEnd();
|
|
|
ret = srcString; //返回值赋值
|
|
ret = srcString; //返回值赋值
|
|
|
reader.Close();
|
|
reader.Close();
|
|
|
- function.WriteLog(srcString, "请求开店宝API日志");
|
|
|
|
|
|
|
+ Utils.WriteLog(srcString, "请求开店宝API日志");
|
|
|
}
|
|
}
|
|
|
catch (System.Net.WebException ex)
|
|
catch (System.Net.WebException ex)
|
|
|
{
|
|
{
|
|
@@ -291,7 +291,7 @@ namespace MySystem
|
|
|
catch (Exception ex)
|
|
catch (Exception ex)
|
|
|
{
|
|
{
|
|
|
ret = "fail";
|
|
ret = "fail";
|
|
|
- function.WriteLog(DateTime.Now.ToString() + "\r\n" + ex.ToString(), "请求开店宝API异常");
|
|
|
|
|
|
|
+ Utils.WriteLog(DateTime.Now.ToString() + "\r\n" + ex.ToString(), "请求开店宝API异常");
|
|
|
}
|
|
}
|
|
|
return ret;
|
|
return ret;
|
|
|
}
|
|
}
|
|
@@ -316,7 +316,7 @@ namespace MySystem
|
|
|
var BoxRequestUrl = HaodaParam.BoxRequestUrl;
|
|
var BoxRequestUrl = HaodaParam.BoxRequestUrl;
|
|
|
if (BrandId == 1) BoxRequestUrl = HaodaUnionParam.BoxRequestUrl;
|
|
if (BrandId == 1) BoxRequestUrl = HaodaUnionParam.BoxRequestUrl;
|
|
|
|
|
|
|
|
- function.WriteLog(DateTime.Now.ToString(), "好哒微信公众号和小程序支付");
|
|
|
|
|
|
|
+ Utils.WriteLog(DateTime.Now.ToString(), "好哒微信公众号和小程序支付");
|
|
|
Dictionary<string, object> reqdic = new Dictionary<string, object>();
|
|
Dictionary<string, object> reqdic = new Dictionary<string, object>();
|
|
|
reqdic.Add("mchtNo", mchtNo); //盒子的商户编号
|
|
reqdic.Add("mchtNo", mchtNo); //盒子的商户编号
|
|
|
reqdic.Add("storeNo", storeNo); //盒子的门店编码
|
|
reqdic.Add("storeNo", storeNo); //盒子的门店编码
|
|
@@ -331,14 +331,14 @@ namespace MySystem
|
|
|
reqdic.Add("ledgerModel", ledgerModel); //分账类型:1不分账 2分账,注意只有开通了分账才能传这个字段
|
|
reqdic.Add("ledgerModel", ledgerModel); //分账类型:1不分账 2分账,注意只有开通了分账才能传这个字段
|
|
|
|
|
|
|
|
string req = Newtonsoft.Json.JsonConvert.SerializeObject(reqdic);
|
|
string req = Newtonsoft.Json.JsonConvert.SerializeObject(reqdic);
|
|
|
- function.WriteLog(req, "好哒微信公众号和小程序支付");
|
|
|
|
|
|
|
+ Utils.WriteLog(req, "好哒微信公众号和小程序支付");
|
|
|
Dictionary<string, string> headdic = GetHeader(req);
|
|
Dictionary<string, string> headdic = GetHeader(req);
|
|
|
string head = Newtonsoft.Json.JsonConvert.SerializeObject(headdic);
|
|
string head = Newtonsoft.Json.JsonConvert.SerializeObject(headdic);
|
|
|
- function.WriteLog("请求头\n" + head, "好哒微信公众号和小程序支付");
|
|
|
|
|
- function.WriteLog("请求参数\n" + req, "好哒微信公众号和小程序支付");
|
|
|
|
|
- function.WriteLog("请求地址:" + BoxRequestUrl + "/api/hzg/v2/unitedtrade/wechat_js_pay", "好哒微信公众号和小程序支付");
|
|
|
|
|
|
|
+ Utils.WriteLog("请求头\n" + head, "好哒微信公众号和小程序支付");
|
|
|
|
|
+ Utils.WriteLog("请求参数\n" + req, "好哒微信公众号和小程序支付");
|
|
|
|
|
+ Utils.WriteLog("请求地址:" + BoxRequestUrl + "/api/hzg/v2/unitedtrade/wechat_js_pay", "好哒微信公众号和小程序支付");
|
|
|
string result = PostWebRequest(BoxRequestUrl + "/api/hzg/v2/unitedtrade/wechat_js_pay", req, headdic);
|
|
string result = PostWebRequest(BoxRequestUrl + "/api/hzg/v2/unitedtrade/wechat_js_pay", req, headdic);
|
|
|
- function.WriteLog("返回\n" + result + "\n\n", "好哒微信公众号和小程序支付");
|
|
|
|
|
|
|
+ Utils.WriteLog("返回\n" + result + "\n\n", "好哒微信公众号和小程序支付");
|
|
|
|
|
|
|
|
return result;
|
|
return result;
|
|
|
}
|
|
}
|
|
@@ -360,7 +360,7 @@ namespace MySystem
|
|
|
var BoxRequestUrl = HaodaParam.BoxRequestUrl;
|
|
var BoxRequestUrl = HaodaParam.BoxRequestUrl;
|
|
|
if (BrandId == 1) BoxRequestUrl = HaodaUnionParam.BoxRequestUrl;
|
|
if (BrandId == 1) BoxRequestUrl = HaodaUnionParam.BoxRequestUrl;
|
|
|
|
|
|
|
|
- function.WriteLog(DateTime.Now.ToString(), "好哒支付宝服务窗支付");
|
|
|
|
|
|
|
+ Utils.WriteLog(DateTime.Now.ToString(), "好哒支付宝服务窗支付");
|
|
|
Dictionary<string, object> reqdic = new Dictionary<string, object>();
|
|
Dictionary<string, object> reqdic = new Dictionary<string, object>();
|
|
|
reqdic.Add("mchtNo", mchtNo); //盒子的商户编号
|
|
reqdic.Add("mchtNo", mchtNo); //盒子的商户编号
|
|
|
reqdic.Add("storeNo", storeNo); //盒子的门店编码
|
|
reqdic.Add("storeNo", storeNo); //盒子的门店编码
|
|
@@ -373,14 +373,14 @@ namespace MySystem
|
|
|
reqdic.Add("ledgerModel", ledgerModel); //分账类型:1不分账 2分账,注意只有开通了分账才能传这个字段
|
|
reqdic.Add("ledgerModel", ledgerModel); //分账类型:1不分账 2分账,注意只有开通了分账才能传这个字段
|
|
|
|
|
|
|
|
string req = Newtonsoft.Json.JsonConvert.SerializeObject(reqdic);
|
|
string req = Newtonsoft.Json.JsonConvert.SerializeObject(reqdic);
|
|
|
- function.WriteLog(req, "好哒支付宝服务窗支付");
|
|
|
|
|
|
|
+ Utils.WriteLog(req, "好哒支付宝服务窗支付");
|
|
|
Dictionary<string, string> headdic = GetHeader(req);
|
|
Dictionary<string, string> headdic = GetHeader(req);
|
|
|
string head = Newtonsoft.Json.JsonConvert.SerializeObject(headdic);
|
|
string head = Newtonsoft.Json.JsonConvert.SerializeObject(headdic);
|
|
|
- function.WriteLog("请求头\n" + head, "好哒支付宝服务窗支付");
|
|
|
|
|
- function.WriteLog("请求参数\n" + req, "好哒支付宝服务窗支付");
|
|
|
|
|
- function.WriteLog("请求地址:" + BoxRequestUrl + "/api/hzg/v2/unitedtrade/ali_js_pay", "好哒支付宝服务窗支付");
|
|
|
|
|
|
|
+ Utils.WriteLog("请求头\n" + head, "好哒支付宝服务窗支付");
|
|
|
|
|
+ Utils.WriteLog("请求参数\n" + req, "好哒支付宝服务窗支付");
|
|
|
|
|
+ Utils.WriteLog("请求地址:" + BoxRequestUrl + "/api/hzg/v2/unitedtrade/ali_js_pay", "好哒支付宝服务窗支付");
|
|
|
string result = PostWebRequest(BoxRequestUrl + "/api/hzg/v2/unitedtrade/ali_js_pay", req, headdic);
|
|
string result = PostWebRequest(BoxRequestUrl + "/api/hzg/v2/unitedtrade/ali_js_pay", req, headdic);
|
|
|
- function.WriteLog("返回\n" + result + "\n\n", "好哒支付宝服务窗支付");
|
|
|
|
|
|
|
+ Utils.WriteLog("返回\n" + result + "\n\n", "好哒支付宝服务窗支付");
|
|
|
|
|
|
|
|
return result;
|
|
return result;
|
|
|
}
|
|
}
|
|
@@ -402,7 +402,7 @@ namespace MySystem
|
|
|
var BoxRequestUrl = HaodaParam.BoxRequestUrl;
|
|
var BoxRequestUrl = HaodaParam.BoxRequestUrl;
|
|
|
if (BrandId == 1) BoxRequestUrl = HaodaUnionParam.BoxRequestUrl;
|
|
if (BrandId == 1) BoxRequestUrl = HaodaUnionParam.BoxRequestUrl;
|
|
|
|
|
|
|
|
- function.WriteLog(DateTime.Now.ToString(), "好哒到账记录查询");
|
|
|
|
|
|
|
+ Utils.WriteLog(DateTime.Now.ToString(), "好哒到账记录查询");
|
|
|
Dictionary<string, object> reqdic = new Dictionary<string, object>();
|
|
Dictionary<string, object> reqdic = new Dictionary<string, object>();
|
|
|
reqdic.Add("mchtNo", mchtNo); //商户号
|
|
reqdic.Add("mchtNo", mchtNo); //商户号
|
|
|
reqdic.Add("startTime", startTime); //查询开始时间(yyyy-MM-dd)
|
|
reqdic.Add("startTime", startTime); //查询开始时间(yyyy-MM-dd)
|
|
@@ -414,14 +414,14 @@ namespace MySystem
|
|
|
reqdic.Add("rows", rows); //每页大小,默认10,最大500
|
|
reqdic.Add("rows", rows); //每页大小,默认10,最大500
|
|
|
|
|
|
|
|
string req = Newtonsoft.Json.JsonConvert.SerializeObject(reqdic);
|
|
string req = Newtonsoft.Json.JsonConvert.SerializeObject(reqdic);
|
|
|
- function.WriteLog(req, "好哒到账记录查询");
|
|
|
|
|
|
|
+ Utils.WriteLog(req, "好哒到账记录查询");
|
|
|
Dictionary<string, string> headdic = GetHeader(req);
|
|
Dictionary<string, string> headdic = GetHeader(req);
|
|
|
string head = Newtonsoft.Json.JsonConvert.SerializeObject(headdic);
|
|
string head = Newtonsoft.Json.JsonConvert.SerializeObject(headdic);
|
|
|
- function.WriteLog("请求头\n" + head, "好哒到账记录查询");
|
|
|
|
|
- function.WriteLog("请求参数\n" + req, "好哒到账记录查询");
|
|
|
|
|
- function.WriteLog("请求地址:" + BoxRequestUrl + "/api/v3/hzg/accb/to_account/query", "好哒到账记录查询");
|
|
|
|
|
|
|
+ Utils.WriteLog("请求头\n" + head, "好哒到账记录查询");
|
|
|
|
|
+ Utils.WriteLog("请求参数\n" + req, "好哒到账记录查询");
|
|
|
|
|
+ Utils.WriteLog("请求地址:" + BoxRequestUrl + "/api/v3/hzg/accb/to_account/query", "好哒到账记录查询");
|
|
|
string result = PostWebRequest(BoxRequestUrl + "/api/v3/hzg/accb/to_account/query", req, headdic);
|
|
string result = PostWebRequest(BoxRequestUrl + "/api/v3/hzg/accb/to_account/query", req, headdic);
|
|
|
- function.WriteLog("返回\n" + result + "\n\n", "好哒到账记录查询");
|
|
|
|
|
|
|
+ Utils.WriteLog("返回\n" + result + "\n\n", "好哒到账记录查询");
|
|
|
|
|
|
|
|
return result;
|
|
return result;
|
|
|
}
|
|
}
|
|
@@ -437,20 +437,20 @@ namespace MySystem
|
|
|
var BoxRequestUrl = HaodaParam.BoxRequestUrl;
|
|
var BoxRequestUrl = HaodaParam.BoxRequestUrl;
|
|
|
if (BrandId == 1) BoxRequestUrl = HaodaUnionParam.BoxRequestUrl;
|
|
if (BrandId == 1) BoxRequestUrl = HaodaUnionParam.BoxRequestUrl;
|
|
|
|
|
|
|
|
- function.WriteLog(DateTime.Now.ToString(), "好哒到账记录详情");
|
|
|
|
|
|
|
+ Utils.WriteLog(DateTime.Now.ToString(), "好哒到账记录详情");
|
|
|
Dictionary<string, object> reqdic = new Dictionary<string, object>();
|
|
Dictionary<string, object> reqdic = new Dictionary<string, object>();
|
|
|
reqdic.Add("mchtNo", mchtNo); //商户号
|
|
reqdic.Add("mchtNo", mchtNo); //商户号
|
|
|
reqdic.Add("id", id); //id
|
|
reqdic.Add("id", id); //id
|
|
|
|
|
|
|
|
string req = Newtonsoft.Json.JsonConvert.SerializeObject(reqdic);
|
|
string req = Newtonsoft.Json.JsonConvert.SerializeObject(reqdic);
|
|
|
- function.WriteLog(req, "好哒到账记录详情");
|
|
|
|
|
|
|
+ Utils.WriteLog(req, "好哒到账记录详情");
|
|
|
Dictionary<string, string> headdic = GetHeader(req);
|
|
Dictionary<string, string> headdic = GetHeader(req);
|
|
|
string head = Newtonsoft.Json.JsonConvert.SerializeObject(headdic);
|
|
string head = Newtonsoft.Json.JsonConvert.SerializeObject(headdic);
|
|
|
- function.WriteLog("请求头\n" + head, "好哒到账记录详情");
|
|
|
|
|
- function.WriteLog("请求参数\n" + req, "好哒到账记录详情");
|
|
|
|
|
- function.WriteLog("请求地址:" + BoxRequestUrl + "/api/v3/hzg/accb/to_account/get", "好哒到账记录详情");
|
|
|
|
|
|
|
+ Utils.WriteLog("请求头\n" + head, "好哒到账记录详情");
|
|
|
|
|
+ Utils.WriteLog("请求参数\n" + req, "好哒到账记录详情");
|
|
|
|
|
+ Utils.WriteLog("请求地址:" + BoxRequestUrl + "/api/v3/hzg/accb/to_account/get", "好哒到账记录详情");
|
|
|
string result = PostWebRequest(BoxRequestUrl + "/api/v3/hzg/accb/to_account/get", req, headdic);
|
|
string result = PostWebRequest(BoxRequestUrl + "/api/v3/hzg/accb/to_account/get", req, headdic);
|
|
|
- function.WriteLog("返回\n" + result + "\n\n", "好哒到账记录详情");
|
|
|
|
|
|
|
+ Utils.WriteLog("返回\n" + result + "\n\n", "好哒到账记录详情");
|
|
|
|
|
|
|
|
return result;
|
|
return result;
|
|
|
}
|
|
}
|