|
@@ -323,24 +323,26 @@ namespace MySystem
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
- /// 订单分账申请
|
|
|
+ /// 分账交易详情查询
|
|
|
/// </summary>
|
|
|
- /// <param name="request"></param>
|
|
|
+ /// <param name="mchtNo">慧掌柜商户号</param>
|
|
|
+ /// <param name="orderNo">交易订单号 </param>
|
|
|
/// <returns></returns>
|
|
|
- ///
|
|
|
- public string OrderDivideAccounts(OrderDivideAccounts request)
|
|
|
+ public string QueryOrderDivideAccounts(string mchtNo, string orderNo)
|
|
|
{
|
|
|
- function.WriteLog(DateTime.Now.ToString(), "好哒订单分账申请");
|
|
|
-
|
|
|
- string req = Newtonsoft.Json.JsonConvert.SerializeObject(request);
|
|
|
- function.WriteLog(req, "好哒订单分账申请");
|
|
|
+ function.WriteLog(DateTime.Now.ToString(), "好哒分账交易详情查询");
|
|
|
+ Dictionary<string, object> reqdic = new Dictionary<string, object>();
|
|
|
+ reqdic.Add("mchtNo", mchtNo); // 慧掌柜商户号
|
|
|
+ reqdic.Add("orderNo", orderNo); // 交易订单号
|
|
|
+ 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", "好哒订单分账申请");
|
|
|
+ function.WriteLog("请求头\n" + head, "好哒分账交易详情查询");
|
|
|
+ function.WriteLog("请求参数\n" + req, "好哒分账交易详情查询");
|
|
|
+ function.WriteLog("请求地址:" + BoxRequestUrl + "/api/v3/hzg/part/acct/bind_mcht", "好哒分账交易详情查询");
|
|
|
+ string result = PostWebRequest(BoxRequestUrl + "/api/v3/hzg/part/acct/bind_mcht", req, headdic);
|
|
|
+ function.WriteLog("返回\n" + result + "\n\n", "好哒分账交易详情查询");
|
|
|
|
|
|
return result;
|
|
|
}
|
|
@@ -351,21 +353,11 @@ namespace MySystem
|
|
|
/// <param name="request"></param>
|
|
|
/// <returns></returns>
|
|
|
///
|
|
|
- public string OrderDivideAccounts22()
|
|
|
+ public string OrderDivideAccounts(OrderDivideAccounts request)
|
|
|
{
|
|
|
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", "0");
|
|
|
- lists.Add("amount", "1");
|
|
|
- list.Add(lists);
|
|
|
- reqdic.Add("detail", list);
|
|
|
- string req = Newtonsoft.Json.JsonConvert.SerializeObject(reqdic);
|
|
|
+
|
|
|
+ string req = Newtonsoft.Json.JsonConvert.SerializeObject(request);
|
|
|
function.WriteLog(req, "好哒订单分账申请");
|
|
|
Dictionary<string, string> headdic = GetHeader(req);
|
|
|
string head = Newtonsoft.Json.JsonConvert.SerializeObject(headdic);
|
|
@@ -404,38 +396,54 @@ namespace MySystem
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
- /// 聚合支付退款接口
|
|
|
+ /// 商户修改银行卡
|
|
|
/// </summary>
|
|
|
- /// <param name="mchtNo">盒子的商户编号</param>
|
|
|
- /// <param name="storeNo">盒子的门店编号</param>
|
|
|
- /// <param name="outRefundNo">商户退款订单号</param>
|
|
|
- /// <param name="outOrderNo">商户支付订单号</param>
|
|
|
- /// <param name="refundAmount">退款金额,单位:分</param>
|
|
|
+ /// <param name="request"></param>
|
|
|
/// <returns></returns>
|
|
|
- public string AggregatedPayRefundsss()
|
|
|
+ public string ChangeMerchantCard(ChangeMerchantCard request)
|
|
|
{
|
|
|
- function.WriteLog(DateTime.Now.ToString(), "好哒聚合支付退款");
|
|
|
- Dictionary<string, object> reqdic = new Dictionary<string, object>();
|
|
|
+ function.WriteLog(DateTime.Now.ToString(), "好哒商户修改银行卡");
|
|
|
|
|
|
- reqdic.Add("mchtNo", "1475762"); // 盒子的商户编号
|
|
|
- reqdic.Add("storeNo", "21604555"); // 盒子的门店编号
|
|
|
- reqdic.Add("outRefundNo", "1335533180636825300395002090"); //32 商户退款订单号
|
|
|
- reqdic.Add("outOrderNo", "2023081817321700637330891"); // 商户支付订单号
|
|
|
- reqdic.Add("refundAmount", "50"); //10 退款金额,单位:分
|
|
|
+ string req = Newtonsoft.Json.JsonConvert.SerializeObject(request);
|
|
|
+ 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/inst/mcht/update_acct", "好哒商户修改银行卡");
|
|
|
+ string result = PostWebRequest(BoxRequestUrl + "/api/inst/mcht/update_acct", req, headdic);
|
|
|
+ function.WriteLog("返回\n" + result + "\n\n", "好哒商户修改银行卡");
|
|
|
+
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 查询修改银行卡任务审核状态
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="mchtNo">收款商户号</param>
|
|
|
+ /// <param name="taskId">任务id</param>
|
|
|
+ /// <returns></returns>
|
|
|
+ public string QueryChangeCardStatus(string mchtNo, string taskId)
|
|
|
+ {
|
|
|
+ function.WriteLog(DateTime.Now.ToString(), "好哒查询修改银行卡任务审核状态");
|
|
|
+ Dictionary<string, object> reqdic = new Dictionary<string, object>();
|
|
|
+ reqdic.Add("mchtNo", mchtNo);
|
|
|
+ reqdic.Add("taskId", taskId);
|
|
|
|
|
|
string req = Newtonsoft.Json.JsonConvert.SerializeObject(reqdic);
|
|
|
- function.WriteLog(req, "好哒聚合支付退款");
|
|
|
+ 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/hzg/v2/unitedtrade/refund", "好哒聚合支付退款");
|
|
|
- string result = PostWebRequest(BoxRequestUrl + "/api/hzg/v2/unitedtrade/refund", req, headdic);
|
|
|
- function.WriteLog("返回\n" + result + "\n\n", "好哒聚合支付退款");
|
|
|
+ function.WriteLog("请求头\n" + head, "好哒查询修改银行卡任务审核状态");
|
|
|
+ function.WriteLog("请求参数\n" + req, "好哒查询修改银行卡任务审核状态");
|
|
|
+ function.WriteLog("请求地址:" + BoxRequestUrl + "/api/inst/mcht/query_acct_task", "好哒查询修改银行卡任务审核状态");
|
|
|
+ string result = PostWebRequest(BoxRequestUrl + "/api/inst/mcht/query_acct_task", req, headdic);
|
|
|
+ function.WriteLog("返回\n" + result + "\n\n", "好哒查询修改银行卡任务审核状态");
|
|
|
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
/// <summary>
|
|
|
/// 绑定微信appid接口
|
|
|
/// </summary>
|
|
@@ -531,6 +539,106 @@ 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>();
|
|
|
+ lists = new Dictionary<string, object>();
|
|
|
+ reqdic.Add("applyNo", "FZ202309070001");
|
|
|
+ reqdic.Add("mchtNo", "1475762");
|
|
|
+ reqdic.Add("orderNo", "G2230907C01986946066");
|
|
|
+ lists.Add("acctNo", "230817000000000278");
|
|
|
+ lists.Add("acctType", "1");
|
|
|
+ lists.Add("amount", "100");
|
|
|
+ list.Add(lists);
|
|
|
+
|
|
|
+ lists = new Dictionary<string, object>();
|
|
|
+ lists.Add("acctNo", "030510106621391");
|
|
|
+ lists.Add("acctType", "0");
|
|
|
+ lists.Add("amount", "9862");
|
|
|
+ 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>
|
|
|
+ /// 分账交易详情查询
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="mchtNo">慧掌柜商户号</param>
|
|
|
+ /// <param name="orderNo">交易订单号 </param>
|
|
|
+ /// <returns></returns>
|
|
|
+ public string QueryOrderDivideAccountsss()
|
|
|
+ {
|
|
|
+ function.WriteLog(DateTime.Now.ToString(), "好哒分账交易详情查询");
|
|
|
+ Dictionary<string, object> reqdic = new Dictionary<string, object>();
|
|
|
+ reqdic.Add("mchtNo", "1475762"); // 慧掌柜商户号
|
|
|
+ reqdic.Add("orderNo", "G2230907C01986946066"); // 交易订单号
|
|
|
+ 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/trade/clear/get", "好哒分账交易详情查询");
|
|
|
+ string result = PostWebRequest(BoxRequestUrl + "/api/v3/hzg/part/trade/clear/get", req, headdic);
|
|
|
+ function.WriteLog("返回\n" + result + "\n\n", "好哒分账交易详情查询");
|
|
|
+
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 聚合支付退款接口
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="mchtNo">盒子的商户编号</param>
|
|
|
+ /// <param name="storeNo">盒子的门店编号</param>
|
|
|
+ /// <param name="outRefundNo">商户退款订单号</param>
|
|
|
+ /// <param name="outOrderNo">商户支付订单号</param>
|
|
|
+ /// <param name="refundAmount">退款金额,单位:分</param>
|
|
|
+ /// <returns></returns>
|
|
|
+ public string AggregatedPayRefundsss()
|
|
|
+ {
|
|
|
+ function.WriteLog(DateTime.Now.ToString(), "好哒聚合支付退款");
|
|
|
+ Dictionary<string, object> reqdic = new Dictionary<string, object>();
|
|
|
+
|
|
|
+ reqdic.Add("mchtNo", "1475762"); // 盒子的商户编号
|
|
|
+ reqdic.Add("storeNo", "21604555"); // 盒子的门店编号
|
|
|
+ reqdic.Add("outRefundNo", "9335533180636825300395666888"); //32 商户退款订单号
|
|
|
+ reqdic.Add("outOrderNo", "2023090715460060997601022"); // 商户支付订单号
|
|
|
+ reqdic.Add("refundAmount", "502"); //10 退款金额,单位:分
|
|
|
+ reqdic.Add("refundReason", "门店分红"); //退款原因(仅微信交易且退款金额大于1元时在退款消息中展示)
|
|
|
+
|
|
|
+ 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/hzg/v2/unitedtrade/refund", "好哒聚合支付退款");
|
|
|
+ string result = PostWebRequest(BoxRequestUrl + "/api/hzg/v2/unitedtrade/refund", 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>();
|