|
@@ -280,7 +280,7 @@ namespace MySystem
|
|
|
/// <param name="mchtNo">慧掌柜商户号</param>
|
|
|
/// <param name="storeNo">慧掌柜门店号</param>
|
|
|
/// <returns></returns>
|
|
|
- public string OrderDivideAccounts(string acctNo, string mchtNo, string storeNo)
|
|
|
+ public string DivideAccountsSign(string acctNo, string mchtNo, string storeNo)
|
|
|
{
|
|
|
function.WriteLog(DateTime.Now.ToString(), "好哒分账接收方签约");
|
|
|
Dictionary<string, object> reqdic = new Dictionary<string, object>();
|
|
@@ -321,6 +321,7 @@ namespace MySystem
|
|
|
|
|
|
return result;
|
|
|
}
|
|
|
+
|
|
|
/// <summary>
|
|
|
/// 订单分账申请
|
|
|
/// </summary>
|
|
@@ -344,6 +345,134 @@ namespace MySystem
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
+ /// <summary>
|
|
|
+ /// 订单分账申请
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="request"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ ///
|
|
|
+ public string OrderDivideAccounts22()
|
|
|
+ {
|
|
|
+ function.WriteLog(DateTime.Now.ToString(), "好哒订单分账申请");
|
|
|
+ Dictionary<string, object> reqdic = new Dictionary<string, object>();
|
|
|
+ List<Dictionary<string, object>> list = new List<Dictionary<string, object>> ();
|
|
|
+ Dictionary<string, object> lists = new Dictionary<string, object>();
|
|
|
+ reqdic.Add("applyNo", "FZ202307050006");
|
|
|
+ reqdic.Add("mchtNo", "1475762");
|
|
|
+ reqdic.Add("orderNo", "G2230818C01935875690");
|
|
|
+ lists.Add("acctNo","030510106621391");
|
|
|
+ lists.Add("acctType","1");
|
|
|
+ lists.Add("amount","1");
|
|
|
+ list.Add(lists);
|
|
|
+ reqdic.Add("detail", list);
|
|
|
+ string req = Newtonsoft.Json.JsonConvert.SerializeObject(reqdic);
|
|
|
+ function.WriteLog(req, "好哒订单分账申请");
|
|
|
+ Dictionary<string, string> headdic = GetHeader(req);
|
|
|
+ string head = Newtonsoft.Json.JsonConvert.SerializeObject(headdic);
|
|
|
+ function.WriteLog("请求头\n" + head, "好哒订单分账申请");
|
|
|
+ function.WriteLog("请求参数\n" + req, "好哒订单分账申请");
|
|
|
+ function.WriteLog("请求地址:" + BoxRequestUrl + "/api/v3/hzg/part/order/apply", "好哒订单分账申请");
|
|
|
+ string result = PostWebRequest(BoxRequestUrl + "/api/v3/hzg/part/order/apply", req, headdic);
|
|
|
+ function.WriteLog("返回\n" + result + "\n\n", "好哒订单分账申请");
|
|
|
+
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 绑定微信appid接口
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="mchtNo">盒子的商户编号</param>
|
|
|
+ /// <param name="storeNo">盒子的门店编号</param>
|
|
|
+ /// <param name="subAppId">公众号appid或者小程序appid</param>
|
|
|
+ /// <returns></returns>
|
|
|
+ public string BindWeChatAppId(string mchtNo, string storeNo, string subAppId)
|
|
|
+ {
|
|
|
+ function.WriteLog(DateTime.Now.ToString(), "好哒绑定微信appid接口");
|
|
|
+ Dictionary<string, object> reqdic = new Dictionary<string, object>();
|
|
|
+
|
|
|
+ reqdic.Add("mchtNo", mchtNo); // 盒子商户号
|
|
|
+ reqdic.Add("storeNo", storeNo); // 盒子门店号
|
|
|
+ reqdic.Add("subAppId", subAppId); // 公众号appid或者小程序appid
|
|
|
+
|
|
|
+ string req = Newtonsoft.Json.JsonConvert.SerializeObject(reqdic);
|
|
|
+ function.WriteLog(req, "好哒绑定微信appid接口");
|
|
|
+ Dictionary<string, string> headdic = GetHeader(req);
|
|
|
+ string head = Newtonsoft.Json.JsonConvert.SerializeObject(headdic);
|
|
|
+ function.WriteLog("请求头\n" + head, "好哒绑定微信appid接口");
|
|
|
+ function.WriteLog("请求参数\n" + req, "好哒绑定微信appid接口");
|
|
|
+ function.WriteLog("请求地址:" + BoxRequestUrl + "/api/hzg/v2/wechat/add_sub_config", "好哒绑定微信appid接口");
|
|
|
+ string result = PostWebRequest(BoxRequestUrl + "/api/hzg/v2/wechat/add_sub_config", req, headdic);
|
|
|
+ function.WriteLog("返回\n" + result + "\n\n", "好哒绑定微信appid接口");
|
|
|
+
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 到账记录查询
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="mchtNo">商户号</param>
|
|
|
+ /// <param name="startTime">查询开始时间(yyyy-MM-dd)</param>
|
|
|
+ /// <param name="endTime">查询结束时间(yyyy-MM-dd),最大查询时间区间31天</param>
|
|
|
+ /// <param name="tradeMchtNo">收单商户号(15位)</param>
|
|
|
+ /// <param name="cardNo">结算卡号</param>
|
|
|
+ /// <param name="settleStatus">出款状态(0:入账成功、1:入账失败、2:结算超时、3:入账受理成功、4:已提交结算请求)</param>
|
|
|
+ /// <param name="page">当前页数,默认1</param>
|
|
|
+ /// <param name="rows">每页大小,默认10,最大500</param>
|
|
|
+ /// <returns></returns>
|
|
|
+ public string QueryAccountList(string mchtNo, string startTime, string endTime, string tradeMchtNo, string cardNo, string settleStatus, string page = "1", string rows = "10")
|
|
|
+ {
|
|
|
+ function.WriteLog(DateTime.Now.ToString(), "好哒到账记录查询");
|
|
|
+ Dictionary<string, object> reqdic = new Dictionary<string, object>();
|
|
|
+
|
|
|
+ reqdic.Add("mchtNo", mchtNo); // 盒子商户号
|
|
|
+ reqdic.Add("startTime", startTime); // 查询开始时间(yyyy-MM-dd)
|
|
|
+ reqdic.Add("endTime", endTime); // 查询结束时间(yyyy-MM-dd),最大查询时间区间31天
|
|
|
+ reqdic.Add("tradeMchtNo", tradeMchtNo); // 收单商户号(15位)
|
|
|
+ reqdic.Add("cardNo", cardNo); // 结算卡号
|
|
|
+ reqdic.Add("settleStatus", settleStatus); // 出款状态(0:入账成功、1:入账失败、2:结算超时、3:入账受理成功、4:已提交结算请求)
|
|
|
+ reqdic.Add("page", page); // 当前页数,默认1
|
|
|
+ reqdic.Add("rows", rows); // 每页大小,默认10,最大500
|
|
|
+
|
|
|
+ string req = Newtonsoft.Json.JsonConvert.SerializeObject(reqdic);
|
|
|
+ function.WriteLog(req, "好哒到账记录查询");
|
|
|
+ Dictionary<string, string> headdic = GetHeader(req);
|
|
|
+ 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", "好哒到账记录查询");
|
|
|
+ string result = PostWebRequest(BoxRequestUrl + "/api/v3/hzg/accb/to_account/query", req, headdic);
|
|
|
+ function.WriteLog("返回\n" + result + "\n\n", "好哒到账记录查询");
|
|
|
+
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 到账记录详情
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="mchtNo">商户号</param>
|
|
|
+ /// <param name="id"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ public string QueryAccountDetail(string mchtNo, string id)
|
|
|
+ {
|
|
|
+ function.WriteLog(DateTime.Now.ToString(), "好哒到账记录详情");
|
|
|
+ Dictionary<string, object> reqdic = new Dictionary<string, object>();
|
|
|
+
|
|
|
+ reqdic.Add("mchtNo", mchtNo); // 商户号
|
|
|
+ reqdic.Add("id", id); // id
|
|
|
+
|
|
|
+ string req = Newtonsoft.Json.JsonConvert.SerializeObject(reqdic);
|
|
|
+ function.WriteLog(req, "好哒到账记录详情");
|
|
|
+ Dictionary<string, string> headdic = GetHeader(req);
|
|
|
+ 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", "好哒到账记录详情");
|
|
|
+ string result = PostWebRequest(BoxRequestUrl + "/api/v3/hzg/accb/to_account/get", req, headdic);
|
|
|
+ function.WriteLog("返回\n" + result + "\n\n", "好哒到账记录详情");
|
|
|
+
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
public Dictionary<string, string> GetHeader(string req)
|
|
|
{
|
|
|
Dictionary<string, string> headdic = new Dictionary<string, string>();
|