|
@@ -50,7 +50,7 @@ namespace MySystem
|
|
|
/// </summary>
|
|
|
/// <param name="request"></param>
|
|
|
/// <returns></returns>
|
|
|
- public string AddNewMerchant(AddNewMerchant request, int BrandId = 0)
|
|
|
+ public string AddNewMerchant(AddNewMerchant request, int BrandId = 0, string AgentTag = "1")
|
|
|
{
|
|
|
var BoxRequestUrl = HaodaUnionParam.BoxRequestUrl;
|
|
|
if (BrandId == 1)
|
|
@@ -64,7 +64,7 @@ namespace MySystem
|
|
|
|
|
|
string req = Newtonsoft.Json.JsonConvert.SerializeObject(request);
|
|
|
LogHelper.Instance.WriteLog(req, "好哒新创建商户");
|
|
|
- Dictionary<string, string> headdic = GetHeader(req, BrandId);
|
|
|
+ Dictionary<string, string> headdic = GetHeader(req, BrandId, AgentTag);
|
|
|
string head = Newtonsoft.Json.JsonConvert.SerializeObject(headdic);
|
|
|
LogHelper.Instance.WriteLog("请求头\n" + head, "好哒新创建商户");
|
|
|
LogHelper.Instance.WriteLog("请求参数\n" + req, "好哒新创建商户");
|
|
@@ -81,7 +81,7 @@ namespace MySystem
|
|
|
/// <param name="instId">机构编号</param>
|
|
|
/// <param name="mchtNo">收款商户号</param>
|
|
|
/// <returns></returns>
|
|
|
- public string QueryMerchantStatus(string instId, string mchtNo, int BrandId = 0)
|
|
|
+ public string QueryMerchantStatus(string instId, string mchtNo, int BrandId = 0, string AgentTag = "1")
|
|
|
{
|
|
|
if(string.IsNullOrEmpty(mchtNo))
|
|
|
{
|
|
@@ -97,7 +97,7 @@ namespace MySystem
|
|
|
|
|
|
string req = Newtonsoft.Json.JsonConvert.SerializeObject(reqdic);
|
|
|
LogHelper.Instance.WriteLog(req, "好哒查询商户审核状态");
|
|
|
- Dictionary<string, string> headdic = GetHeader(req, BrandId);
|
|
|
+ Dictionary<string, string> headdic = GetHeader(req, BrandId, AgentTag);
|
|
|
string head = Newtonsoft.Json.JsonConvert.SerializeObject(headdic);
|
|
|
LogHelper.Instance.WriteLog("请求头\n" + head, "好哒查询商户审核状态");
|
|
|
LogHelper.Instance.WriteLog("请求参数\n" + req, "好哒查询商户审核状态");
|
|
@@ -114,7 +114,7 @@ namespace MySystem
|
|
|
/// <param name="mchtNo">慧掌柜商户号</param>
|
|
|
/// <param name="storeNo">慧掌柜门店号</param>
|
|
|
/// <returns></returns>
|
|
|
- public string QueryAuthStatus(string mchtNo, string storeNo, int BrandId = 0)
|
|
|
+ public string QueryAuthStatus(string mchtNo, string storeNo, int BrandId = 0, string AgentTag = "1")
|
|
|
{
|
|
|
var BoxRequestUrl = HaodaUnionParam.BoxRequestUrl;
|
|
|
if (BrandId == 1) BoxRequestUrl = HaodaParam.BoxRequestUrl;
|
|
@@ -125,7 +125,7 @@ namespace MySystem
|
|
|
reqdic.Add("storeNo", storeNo); // 慧掌柜门店号
|
|
|
string req = Newtonsoft.Json.JsonConvert.SerializeObject(reqdic);
|
|
|
LogHelper.Instance.WriteLog(req, "好哒查询实名认证状态");
|
|
|
- Dictionary<string, string> headdic = GetHeader(req, BrandId);
|
|
|
+ Dictionary<string, string> headdic = GetHeader(req, BrandId, AgentTag);
|
|
|
string head = Newtonsoft.Json.JsonConvert.SerializeObject(headdic);
|
|
|
LogHelper.Instance.WriteLog("请求头\n" + head, "好哒查询实名认证状态");
|
|
|
LogHelper.Instance.WriteLog("请求参数\n" + req, "好哒查询实名认证状态");
|
|
@@ -142,7 +142,7 @@ namespace MySystem
|
|
|
/// <param name="mchtNo">慧掌柜商户号</param>
|
|
|
/// <param name="storeNo">慧掌柜门店号</param>
|
|
|
/// <returns></returns>
|
|
|
- public string QueryAuthQRcode(string mchtNo, string storeNo, int BrandId = 0)
|
|
|
+ public string QueryAuthQRcode(string mchtNo, string storeNo, int BrandId = 0, string AgentTag = "1")
|
|
|
{
|
|
|
var BoxRequestUrl = HaodaUnionParam.BoxRequestUrl;
|
|
|
if (BrandId == 1) BoxRequestUrl = HaodaParam.BoxRequestUrl;
|
|
@@ -153,7 +153,7 @@ namespace MySystem
|
|
|
reqdic.Add("storeNo", storeNo); // 慧掌柜门店号
|
|
|
string req = Newtonsoft.Json.JsonConvert.SerializeObject(reqdic);
|
|
|
LogHelper.Instance.WriteLog(req, "好哒查询实名认证二维码");
|
|
|
- Dictionary<string, string> headdic = GetHeader(req, BrandId);
|
|
|
+ Dictionary<string, string> headdic = GetHeader(req, BrandId, AgentTag);
|
|
|
string head = Newtonsoft.Json.JsonConvert.SerializeObject(headdic);
|
|
|
LogHelper.Instance.WriteLog("请求头\n" + head, "好哒查询实名认证二维码");
|
|
|
LogHelper.Instance.WriteLog("请求参数\n" + req, "好哒查询实名认证二维码");
|
|
@@ -178,7 +178,7 @@ namespace MySystem
|
|
|
/// <param name="subAppIdType">对应的类型,默认为公众号, SUBSCRIPTION: 公众号 MINI_PROGRAM: 小程序</param>
|
|
|
/// <param name="ledgerModel">分账类型:1不分账 2分账,注意只有开通了分账才能传这个字段</param>
|
|
|
/// <returns></returns>
|
|
|
- public string WeChatPay(string mchtNo, string storeNo, string outOrderNo, string transAmount, string callbackUrl, string subOpenId, string confirmCode, string subAppId, string subAppIdType, string ledgerModel, int BrandId = 0)
|
|
|
+ public string WeChatPay(string mchtNo, string storeNo, string outOrderNo, string transAmount, string callbackUrl, string subOpenId, string confirmCode, string subAppId, string subAppIdType, string ledgerModel, int BrandId = 0, string AgentTag = "1")
|
|
|
{
|
|
|
var BoxRequestUrl = HaodaUnionParam.BoxRequestUrl;
|
|
|
if (BrandId == 1) BoxRequestUrl = HaodaParam.BoxRequestUrl;
|
|
@@ -198,7 +198,7 @@ namespace MySystem
|
|
|
|
|
|
string req = Newtonsoft.Json.JsonConvert.SerializeObject(reqdic);
|
|
|
LogHelper.Instance.WriteLog(req, "好哒微信公众号和小程序支付");
|
|
|
- Dictionary<string, string> headdic = GetHeader(req, BrandId);
|
|
|
+ Dictionary<string, string> headdic = GetHeader(req, BrandId, AgentTag);
|
|
|
string head = Newtonsoft.Json.JsonConvert.SerializeObject(headdic);
|
|
|
LogHelper.Instance.WriteLog("请求头\n" + head, "好哒微信公众号和小程序支付");
|
|
|
LogHelper.Instance.WriteLog("请求参数\n" + req, "好哒微信公众号和小程序支付");
|
|
@@ -220,7 +220,7 @@ namespace MySystem
|
|
|
/// <param name="subOpenId">支付宝用户标识</param>
|
|
|
/// <param name="confirmCode">支付确认码,由4位纯数字组成,每次请求时随机生成</param>
|
|
|
/// <returns></returns>
|
|
|
- public string Alipay(string mchtNo, string storeNo, string outOrderNo, string transAmount, string callbackUrl, string subOpenId, string confirmCode, int BrandId = 0)
|
|
|
+ public string Alipay(string mchtNo, string storeNo, string outOrderNo, string transAmount, string callbackUrl, string subOpenId, string confirmCode, int BrandId = 0, string AgentTag = "1")
|
|
|
{
|
|
|
var BoxRequestUrl = HaodaUnionParam.BoxRequestUrl;
|
|
|
if (BrandId == 1) BoxRequestUrl = HaodaParam.BoxRequestUrl;
|
|
@@ -237,7 +237,7 @@ namespace MySystem
|
|
|
|
|
|
string req = Newtonsoft.Json.JsonConvert.SerializeObject(reqdic);
|
|
|
LogHelper.Instance.WriteLog(req, "好哒支付宝服务窗支付");
|
|
|
- Dictionary<string, string> headdic = GetHeader(req, BrandId);
|
|
|
+ Dictionary<string, string> headdic = GetHeader(req, BrandId, AgentTag);
|
|
|
string head = Newtonsoft.Json.JsonConvert.SerializeObject(headdic);
|
|
|
LogHelper.Instance.WriteLog("请求头\n" + head, "好哒支付宝服务窗支付");
|
|
|
LogHelper.Instance.WriteLog("请求参数\n" + req, "好哒支付宝服务窗支付");
|
|
@@ -257,7 +257,7 @@ namespace MySystem
|
|
|
/// <param name="outOrderNo">商户支付订单号</param>
|
|
|
/// <param name="refundAmount">退款金额,单位:分</param>
|
|
|
/// <returns></returns>
|
|
|
- public string AggregatedPayRefund(string mchtNo, string storeNo, string outRefundNo, string outOrderNo, string refundAmount, int BrandId = 0)
|
|
|
+ public string AggregatedPayRefund(string mchtNo, string storeNo, string outRefundNo, string outOrderNo, string refundAmount, int BrandId = 0, string AgentTag = "1")
|
|
|
{
|
|
|
var BoxRequestUrl = HaodaUnionParam.BoxRequestUrl;
|
|
|
if (BrandId == 1) BoxRequestUrl = HaodaParam.BoxRequestUrl;
|
|
@@ -274,7 +274,7 @@ namespace MySystem
|
|
|
|
|
|
string req = Newtonsoft.Json.JsonConvert.SerializeObject(reqdic);
|
|
|
LogHelper.Instance.WriteLog(req, "好哒聚合支付退款");
|
|
|
- Dictionary<string, string> headdic = GetHeader(req, BrandId);
|
|
|
+ Dictionary<string, string> headdic = GetHeader(req, BrandId, AgentTag);
|
|
|
string head = Newtonsoft.Json.JsonConvert.SerializeObject(headdic);
|
|
|
LogHelper.Instance.WriteLog("请求头\n" + head, "好哒聚合支付退款");
|
|
|
LogHelper.Instance.WriteLog("请求参数\n" + req, "好哒聚合支付退款");
|
|
@@ -291,7 +291,7 @@ namespace MySystem
|
|
|
/// <param name="mchtNo">慧掌柜商户号(进件接口返回的outMchtNo字段)</param>
|
|
|
/// <param name="storeNo">慧掌柜门店号</param>
|
|
|
/// <returns></returns>
|
|
|
- public string OpenDivideAccounts(string mchtNo, string storeNo, int BrandId = 0)
|
|
|
+ public string OpenDivideAccounts(string mchtNo, string storeNo, int BrandId = 0, string AgentTag = "1")
|
|
|
{
|
|
|
var BoxRequestUrl = HaodaUnionParam.BoxRequestUrl;
|
|
|
if (BrandId == 1) BoxRequestUrl = HaodaParam.BoxRequestUrl;
|
|
@@ -304,7 +304,7 @@ namespace MySystem
|
|
|
|
|
|
string req = Newtonsoft.Json.JsonConvert.SerializeObject(reqdic);
|
|
|
LogHelper.Instance.WriteLog(req, "好哒开通分账");
|
|
|
- Dictionary<string, string> headdic = GetHeader(req, BrandId);
|
|
|
+ Dictionary<string, string> headdic = GetHeader(req, BrandId, AgentTag);
|
|
|
string head = Newtonsoft.Json.JsonConvert.SerializeObject(headdic);
|
|
|
LogHelper.Instance.WriteLog("请求头\n" + head, "好哒开通分账");
|
|
|
LogHelper.Instance.WriteLog("请求参数\n" + req, "好哒开通分账");
|
|
@@ -322,7 +322,7 @@ namespace MySystem
|
|
|
/// <param name="mchtNo">慧掌柜商户号</param>
|
|
|
/// <param name="storeNo">慧掌柜门店号</param>
|
|
|
/// <returns></returns>
|
|
|
- public string DivideAccountsSign(string acctNo, string mchtNo, string storeNo, int BrandId = 0)
|
|
|
+ public string DivideAccountsSign(string acctNo, string mchtNo, string storeNo, int BrandId = 0, string AgentTag = "1")
|
|
|
{
|
|
|
var BoxRequestUrl = HaodaUnionParam.BoxRequestUrl;
|
|
|
if (BrandId == 1) BoxRequestUrl = HaodaParam.BoxRequestUrl;
|
|
@@ -334,7 +334,7 @@ namespace MySystem
|
|
|
reqdic.Add("storeNo", storeNo); // 慧掌柜门店号
|
|
|
string req = Newtonsoft.Json.JsonConvert.SerializeObject(reqdic);
|
|
|
LogHelper.Instance.WriteLog(req, "好哒分账接收方签约");
|
|
|
- Dictionary<string, string> headdic = GetHeader(req, BrandId);
|
|
|
+ Dictionary<string, string> headdic = GetHeader(req, BrandId, AgentTag);
|
|
|
string head = Newtonsoft.Json.JsonConvert.SerializeObject(headdic);
|
|
|
LogHelper.Instance.WriteLog("请求头\n" + head, "好哒分账接收方签约");
|
|
|
LogHelper.Instance.WriteLog("请求参数\n" + req, "好哒分账接收方签约");
|
|
@@ -350,7 +350,7 @@ namespace MySystem
|
|
|
/// </summary>
|
|
|
/// <param name="request"></param>
|
|
|
/// <returns></returns>
|
|
|
- public string AddOpenDivideAccounts(AddOpenDivideAccounts request, int BrandId = 0)
|
|
|
+ public string AddOpenDivideAccounts(AddOpenDivideAccounts request, int BrandId = 0, string AgentTag = "1")
|
|
|
{
|
|
|
var BoxRequestUrl = HaodaUnionParam.BoxRequestUrl;
|
|
|
if (BrandId == 1) BoxRequestUrl = HaodaParam.BoxRequestUrl;
|
|
@@ -359,7 +359,7 @@ namespace MySystem
|
|
|
|
|
|
string req = Newtonsoft.Json.JsonConvert.SerializeObject(request);
|
|
|
LogHelper.Instance.WriteLog(req, "好哒添加分账接收方账户");
|
|
|
- Dictionary<string, string> headdic = GetHeader(req, BrandId);
|
|
|
+ Dictionary<string, string> headdic = GetHeader(req, BrandId, AgentTag);
|
|
|
string head = Newtonsoft.Json.JsonConvert.SerializeObject(headdic);
|
|
|
LogHelper.Instance.WriteLog("请求头\n" + head, "好哒添加分账接收方账户");
|
|
|
LogHelper.Instance.WriteLog("请求参数\n" + req, "好哒添加分账接收方账户");
|
|
@@ -376,7 +376,7 @@ namespace MySystem
|
|
|
/// <param name="mchtNo">慧掌柜商户号</param>
|
|
|
/// <param name="orderNo">交易订单号 </param>
|
|
|
/// <returns></returns>
|
|
|
- public string QueryOrderDivideAccounts(string mchtNo, string orderNo, int BrandId = 0)
|
|
|
+ public string QueryOrderDivideAccounts(string mchtNo, string orderNo, int BrandId = 0, string AgentTag = "1")
|
|
|
{
|
|
|
var BoxRequestUrl = HaodaUnionParam.BoxRequestUrl;
|
|
|
if (BrandId == 1) BoxRequestUrl = HaodaParam.BoxRequestUrl;
|
|
@@ -387,7 +387,7 @@ namespace MySystem
|
|
|
reqdic.Add("orderNo", orderNo); // 交易订单号
|
|
|
string req = Newtonsoft.Json.JsonConvert.SerializeObject(reqdic);
|
|
|
LogHelper.Instance.WriteLog(req, "好哒分账交易详情查询");
|
|
|
- Dictionary<string, string> headdic = GetHeader(req, BrandId);
|
|
|
+ Dictionary<string, string> headdic = GetHeader(req, BrandId, AgentTag);
|
|
|
string head = Newtonsoft.Json.JsonConvert.SerializeObject(headdic);
|
|
|
LogHelper.Instance.WriteLog("请求头\n" + head, "好哒分账交易详情查询");
|
|
|
LogHelper.Instance.WriteLog("请求参数\n" + req, "好哒分账交易详情查询");
|
|
@@ -404,7 +404,7 @@ namespace MySystem
|
|
|
/// <param name="mchtNo">慧掌柜商户号</param>
|
|
|
/// <param name="orderNo">交易订单号 </param>
|
|
|
/// <returns></returns>
|
|
|
- public string QueryOrderDivideDetail(string mchtNo, string orderNo, int BrandId = 0)
|
|
|
+ public string QueryOrderDivideDetail(string mchtNo, string orderNo, int BrandId = 0, string AgentTag = "1")
|
|
|
{
|
|
|
var BoxRequestUrl = HaodaUnionParam.BoxRequestUrl;
|
|
|
if (BrandId == 1) BoxRequestUrl = HaodaParam.BoxRequestUrl;
|
|
@@ -415,7 +415,7 @@ namespace MySystem
|
|
|
reqdic.Add("orderNo", orderNo); // 交易订单号
|
|
|
string req = Newtonsoft.Json.JsonConvert.SerializeObject(reqdic);
|
|
|
LogHelper.Instance.WriteLog(req, "好哒分账交易详情查询");
|
|
|
- Dictionary<string, string> headdic = GetHeader(req);
|
|
|
+ Dictionary<string, string> headdic = GetHeader(req, BrandId, AgentTag);
|
|
|
string head = Newtonsoft.Json.JsonConvert.SerializeObject(headdic);
|
|
|
LogHelper.Instance.WriteLog("请求头\n" + head, "好哒分账交易详情查询");
|
|
|
LogHelper.Instance.WriteLog("请求参数\n" + req, "好哒分账交易详情查询");
|
|
@@ -432,7 +432,7 @@ namespace MySystem
|
|
|
/// <param name="request"></param>
|
|
|
/// <returns></returns>
|
|
|
///
|
|
|
- public string OrderDivideAccounts(OrderDivideAccounts request, int BrandId = 0)
|
|
|
+ public string OrderDivideAccounts(OrderDivideAccounts request, int BrandId = 0, string AgentTag = "1")
|
|
|
{
|
|
|
var BoxRequestUrl = HaodaUnionParam.BoxRequestUrl;
|
|
|
if (BrandId == 1) BoxRequestUrl = HaodaParam.BoxRequestUrl;
|
|
@@ -441,7 +441,7 @@ namespace MySystem
|
|
|
|
|
|
string req = Newtonsoft.Json.JsonConvert.SerializeObject(request);
|
|
|
LogHelper.Instance.WriteLog(req, "好哒订单分账申请");
|
|
|
- Dictionary<string, string> headdic = GetHeader(req, BrandId);
|
|
|
+ Dictionary<string, string> headdic = GetHeader(req, BrandId, AgentTag);
|
|
|
string head = Newtonsoft.Json.JsonConvert.SerializeObject(headdic);
|
|
|
LogHelper.Instance.WriteLog("请求头\n" + head, "好哒订单分账申请");
|
|
|
LogHelper.Instance.WriteLog("请求参数\n" + req, "好哒订单分账申请");
|
|
@@ -458,7 +458,7 @@ namespace MySystem
|
|
|
/// <param name="applyNo">分账批次号</param>
|
|
|
/// <param name="mchtNo">慧掌柜商户号</param>
|
|
|
/// <returns></returns>
|
|
|
- public string OrderDivideAccountsQuery(string applyNo, string mchtNo, int BrandId = 0)
|
|
|
+ public string OrderDivideAccountsQuery(string applyNo, string mchtNo, int BrandId = 0, string AgentTag = "1")
|
|
|
{
|
|
|
var BoxRequestUrl = HaodaUnionParam.BoxRequestUrl;
|
|
|
if (BrandId == 1) BoxRequestUrl = HaodaParam.BoxRequestUrl;
|
|
@@ -469,7 +469,7 @@ namespace MySystem
|
|
|
reqdic.Add("mchtNo", mchtNo); // 慧掌柜商户号
|
|
|
string req = Newtonsoft.Json.JsonConvert.SerializeObject(reqdic);
|
|
|
LogHelper.Instance.WriteLog(req, "好哒订单分账结果查询");
|
|
|
- Dictionary<string, string> headdic = GetHeader(req, BrandId);
|
|
|
+ Dictionary<string, string> headdic = GetHeader(req, BrandId, AgentTag);
|
|
|
string head = Newtonsoft.Json.JsonConvert.SerializeObject(headdic);
|
|
|
LogHelper.Instance.WriteLog("请求头\n" + head, "好哒订单分账结果查询");
|
|
|
LogHelper.Instance.WriteLog("请求参数\n" + req, "好哒订单分账结果查询");
|
|
@@ -485,7 +485,7 @@ namespace MySystem
|
|
|
/// </summary>
|
|
|
/// <param name="request"></param>
|
|
|
/// <returns></returns>
|
|
|
- public string ChangeMerchantCard(ChangeMerchantCard request, int BrandId = 0)
|
|
|
+ public string ChangeMerchantCard(ChangeMerchantCard request, int BrandId = 0, string AgentTag = "1")
|
|
|
{
|
|
|
var BoxRequestUrl = HaodaUnionParam.BoxRequestUrl;
|
|
|
if (BrandId == 1) BoxRequestUrl = HaodaParam.BoxRequestUrl;
|
|
@@ -494,7 +494,7 @@ namespace MySystem
|
|
|
|
|
|
string req = Newtonsoft.Json.JsonConvert.SerializeObject(request);
|
|
|
LogHelper.Instance.WriteLog(req, "好哒商户修改银行卡");
|
|
|
- Dictionary<string, string> headdic = GetHeader(req, BrandId);
|
|
|
+ Dictionary<string, string> headdic = GetHeader(req, BrandId, AgentTag);
|
|
|
string head = Newtonsoft.Json.JsonConvert.SerializeObject(headdic);
|
|
|
LogHelper.Instance.WriteLog("请求头\n" + head, "好哒商户修改银行卡");
|
|
|
LogHelper.Instance.WriteLog("请求参数\n" + req, "好哒商户修改银行卡");
|
|
@@ -511,7 +511,7 @@ namespace MySystem
|
|
|
/// <param name="mchtNo">收款商户号</param>
|
|
|
/// <param name="taskId">任务id</param>
|
|
|
/// <returns></returns>
|
|
|
- public string QueryChangeCardStatus(string mchtNo, string taskId, int BrandId = 0)
|
|
|
+ public string QueryChangeCardStatus(string mchtNo, string taskId, int BrandId = 0, string AgentTag = "1")
|
|
|
{
|
|
|
var BoxRequestUrl = HaodaUnionParam.BoxRequestUrl;
|
|
|
if (BrandId == 1) BoxRequestUrl = HaodaParam.BoxRequestUrl;
|
|
@@ -523,7 +523,7 @@ namespace MySystem
|
|
|
|
|
|
string req = Newtonsoft.Json.JsonConvert.SerializeObject(reqdic);
|
|
|
LogHelper.Instance.WriteLog(req, "好哒查询修改银行卡任务审核状态");
|
|
|
- Dictionary<string, string> headdic = GetHeader(req, BrandId);
|
|
|
+ Dictionary<string, string> headdic = GetHeader(req, BrandId, AgentTag);
|
|
|
string head = Newtonsoft.Json.JsonConvert.SerializeObject(headdic);
|
|
|
LogHelper.Instance.WriteLog("请求头\n" + head, "好哒查询修改银行卡任务审核状态");
|
|
|
LogHelper.Instance.WriteLog("请求参数\n" + req, "好哒查询修改银行卡任务审核状态");
|
|
@@ -542,7 +542,7 @@ namespace MySystem
|
|
|
/// <param name="storeNo">盒子的门店编号</param>
|
|
|
/// <param name="subAppId">公众号appid或者小程序appid</param>
|
|
|
/// <returns></returns>
|
|
|
- public string BindWeChatAppId(string mchtNo, string storeNo, string subAppId, int BrandId = 0)
|
|
|
+ public string BindWeChatAppId(string mchtNo, string storeNo, string subAppId, int BrandId = 0, string AgentTag = "1")
|
|
|
{
|
|
|
var BoxRequestUrl = HaodaUnionParam.BoxRequestUrl;
|
|
|
if (BrandId == 1) BoxRequestUrl = HaodaParam.BoxRequestUrl;
|
|
@@ -556,7 +556,7 @@ namespace MySystem
|
|
|
|
|
|
string req = Newtonsoft.Json.JsonConvert.SerializeObject(reqdic);
|
|
|
LogHelper.Instance.WriteLog(req, "好哒绑定微信appid接口");
|
|
|
- Dictionary<string, string> headdic = GetHeader(req, BrandId);
|
|
|
+ Dictionary<string, string> headdic = GetHeader(req, BrandId, AgentTag);
|
|
|
string head = Newtonsoft.Json.JsonConvert.SerializeObject(headdic);
|
|
|
LogHelper.Instance.WriteLog("请求头\n" + head, "好哒绑定微信appid接口");
|
|
|
LogHelper.Instance.WriteLog("请求参数\n" + req, "好哒绑定微信appid接口");
|
|
@@ -579,7 +579,7 @@ namespace MySystem
|
|
|
/// <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", int BrandId = 0)
|
|
|
+ public string QueryAccountList(string mchtNo, string startTime, string endTime, string tradeMchtNo, string cardNo, string settleStatus, string page = "1", string rows = "10", int BrandId = 0, string AgentTag = "1")
|
|
|
{
|
|
|
var BoxRequestUrl = HaodaUnionParam.BoxRequestUrl;
|
|
|
if (BrandId == 1) BoxRequestUrl = HaodaParam.BoxRequestUrl;
|
|
@@ -598,7 +598,7 @@ namespace MySystem
|
|
|
|
|
|
string req = Newtonsoft.Json.JsonConvert.SerializeObject(reqdic);
|
|
|
LogHelper.Instance.WriteLog(req, "好哒到账记录查询");
|
|
|
- Dictionary<string, string> headdic = GetHeader(req, BrandId);
|
|
|
+ Dictionary<string, string> headdic = GetHeader(req, BrandId, AgentTag);
|
|
|
string head = Newtonsoft.Json.JsonConvert.SerializeObject(headdic);
|
|
|
LogHelper.Instance.WriteLog("请求头\n" + head, "好哒到账记录查询");
|
|
|
LogHelper.Instance.WriteLog("请求参数\n" + req, "好哒到账记录查询");
|
|
@@ -615,7 +615,7 @@ namespace MySystem
|
|
|
/// <param name="mchtNo">商户号</param>
|
|
|
/// <param name="id"></param>
|
|
|
/// <returns></returns>
|
|
|
- public string QueryAccountDetail(string mchtNo, string id, int BrandId = 0)
|
|
|
+ public string QueryAccountDetail(string mchtNo, string id, int BrandId = 0, string AgentTag = "1")
|
|
|
{
|
|
|
var BoxRequestUrl = HaodaUnionParam.BoxRequestUrl;
|
|
|
if (BrandId == 1) BoxRequestUrl = HaodaParam.BoxRequestUrl;
|
|
@@ -628,7 +628,7 @@ namespace MySystem
|
|
|
|
|
|
string req = Newtonsoft.Json.JsonConvert.SerializeObject(reqdic);
|
|
|
LogHelper.Instance.WriteLog(req, "好哒到账记录详情");
|
|
|
- Dictionary<string, string> headdic = GetHeader(req, BrandId);
|
|
|
+ Dictionary<string, string> headdic = GetHeader(req, BrandId, AgentTag);
|
|
|
string head = Newtonsoft.Json.JsonConvert.SerializeObject(headdic);
|
|
|
LogHelper.Instance.WriteLog("请求头\n" + head, "好哒到账记录详情");
|
|
|
LogHelper.Instance.WriteLog("请求参数\n" + req, "好哒到账记录详情");
|
|
@@ -645,7 +645,7 @@ namespace MySystem
|
|
|
/// <param name="mchtNo">商户号</param>
|
|
|
/// <param name="outOrderNo">商户订单号</param>
|
|
|
/// <returns></returns>
|
|
|
- public string QueryTradeDetail(string mchtNo, string outOrderNo, int BrandId = 0)
|
|
|
+ public string QueryTradeDetail(string mchtNo, string outOrderNo, int BrandId = 0, string AgentTag = "1")
|
|
|
{
|
|
|
var BoxRequestUrl = HaodaUnionParam.BoxRequestUrl;
|
|
|
if (BrandId == 1) BoxRequestUrl = HaodaParam.BoxRequestUrl;
|
|
@@ -658,7 +658,7 @@ namespace MySystem
|
|
|
|
|
|
string req = Newtonsoft.Json.JsonConvert.SerializeObject(reqdic);
|
|
|
LogHelper.Instance.WriteLog(req, "好哒聚合支付查询");
|
|
|
- Dictionary<string, string> headdic = GetHeader(req, BrandId);
|
|
|
+ Dictionary<string, string> headdic = GetHeader(req, BrandId, AgentTag);
|
|
|
string head = Newtonsoft.Json.JsonConvert.SerializeObject(headdic);
|
|
|
LogHelper.Instance.WriteLog("请求头\n" + head, "好哒聚合支付查询");
|
|
|
LogHelper.Instance.WriteLog("请求参数\n" + req, "好哒聚合支付查询");
|
|
@@ -676,7 +676,7 @@ namespace MySystem
|
|
|
/// <param name="storeNo">门店编号</param>
|
|
|
/// <param name="outRefundNo">退款订单号</param>
|
|
|
/// <returns></returns>
|
|
|
- public string QueryRefundDetail(string mchtNo, string storeNo, string outRefundNo, int BrandId = 0)
|
|
|
+ public string QueryRefundDetail(string mchtNo, string storeNo, string outRefundNo, int BrandId = 0, string AgentTag = "1")
|
|
|
{
|
|
|
var BoxRequestUrl = HaodaUnionParam.BoxRequestUrl;
|
|
|
if (BrandId == 1) BoxRequestUrl = HaodaParam.BoxRequestUrl;
|
|
@@ -690,7 +690,7 @@ namespace MySystem
|
|
|
|
|
|
string req = Newtonsoft.Json.JsonConvert.SerializeObject(reqdic);
|
|
|
LogHelper.Instance.WriteLog(req, "好哒退款查询");
|
|
|
- Dictionary<string, string> headdic = GetHeader(req, BrandId);
|
|
|
+ Dictionary<string, string> headdic = GetHeader(req, BrandId, AgentTag);
|
|
|
string head = Newtonsoft.Json.JsonConvert.SerializeObject(headdic);
|
|
|
LogHelper.Instance.WriteLog("请求头\n" + head, "好哒退款查询");
|
|
|
LogHelper.Instance.WriteLog("请求参数\n" + req, "好哒退款查询");
|
|
@@ -706,7 +706,7 @@ namespace MySystem
|
|
|
/// </summary>
|
|
|
/// <param name="request"></param>
|
|
|
/// <returns></returns>
|
|
|
- public string SetFee(string mchtNo, string feeRate, int BrandId = 0)
|
|
|
+ public string SetFee(string mchtNo, string feeRate, int BrandId = 0, string AgentTag = "1")
|
|
|
{
|
|
|
var BoxRequestUrl = HaodaUnionParam.BoxRequestUrl;
|
|
|
if (BrandId == 1) BoxRequestUrl = HaodaParam.BoxRequestUrl;
|
|
@@ -722,7 +722,7 @@ namespace MySystem
|
|
|
|
|
|
string req = Newtonsoft.Json.JsonConvert.SerializeObject(request);
|
|
|
LogHelper.Instance.WriteLog(req, "好哒商户修改费率");
|
|
|
- Dictionary<string, string> headdic = GetHeader(req, BrandId);
|
|
|
+ Dictionary<string, string> headdic = GetHeader(req, BrandId, AgentTag);
|
|
|
string head = Newtonsoft.Json.JsonConvert.SerializeObject(headdic);
|
|
|
LogHelper.Instance.WriteLog("请求头\n" + head, "好哒商户修改费率");
|
|
|
LogHelper.Instance.WriteLog("请求参数\n" + req, "好哒商户修改费率");
|
|
@@ -733,14 +733,22 @@ namespace MySystem
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
- public Dictionary<string, string> GetHeader(string req, int BrandId = 0)
|
|
|
+ public Dictionary<string, string> GetHeader(string req, int BrandId = 0, string Agent = "1")
|
|
|
{
|
|
|
var BoxAppId = HaodaUnionParam.BoxAppId;
|
|
|
var BoxAppSecret = HaodaUnionParam.BoxAppSecret;
|
|
|
if (BrandId == 1)
|
|
|
{
|
|
|
- BoxAppId = HaodaParam.BoxAppId;
|
|
|
- BoxAppSecret = HaodaParam.BoxAppSecret;
|
|
|
+ if(string.IsNullOrEmpty(RedisDbconn.Instance.Get<string>("AgentAppId:" + Agent)))
|
|
|
+ {
|
|
|
+ BoxAppId = HaodaParam.BoxAppId;
|
|
|
+ BoxAppSecret = HaodaParam.BoxAppSecret;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ BoxAppId = RedisDbconn.Instance.Get<string>("AgentAppId:" + Agent);
|
|
|
+ BoxAppSecret = RedisDbconn.Instance.Get<string>("AgentAppSecret:" + Agent);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
Dictionary<string, string> headdic = new Dictionary<string, string>();
|
|
@@ -763,7 +771,7 @@ namespace MySystem
|
|
|
return sign;
|
|
|
}
|
|
|
|
|
|
- public bool VerifySign(string toSignStr, string signStr, int BrandId = 0)
|
|
|
+ public bool VerifySign(string toSignStr, string signStr, int BrandId = 0, string AgentTag = "1")
|
|
|
{
|
|
|
var BoxPublicKey = HaodaUnionParam.BoxPublicKey;
|
|
|
if (BrandId == 1) BoxPublicKey = HaodaParam.BoxPublicKey;
|
|
@@ -783,7 +791,7 @@ namespace MySystem
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- public string SignData(string toSignStr, int BrandId = 0)
|
|
|
+ public string SignData(string toSignStr, int BrandId = 0, string AgentTag = "1")
|
|
|
{
|
|
|
var BoxPublicKey = HaodaUnionParam.BoxPublicKey;
|
|
|
if (BrandId == 1) BoxPublicKey = HaodaParam.BoxPublicKey;
|
|
@@ -866,7 +874,7 @@ namespace MySystem
|
|
|
/// <param name="fileName">文件名</param>
|
|
|
/// <param name="action">操作类型 0 上传图片</param>
|
|
|
/// <returns></returns>
|
|
|
- public string GetToken(string fileName, string action, int BrandId = 0)
|
|
|
+ public string GetToken(string fileName, string action, int BrandId = 0, string AgentTag = "1")
|
|
|
{
|
|
|
var BoxRequestUrl = HaodaUnionParam.BoxRequestUrl;
|
|
|
if (BrandId == 1) BoxRequestUrl = HaodaParam.BoxRequestUrl;
|
|
@@ -879,7 +887,7 @@ namespace MySystem
|
|
|
|
|
|
string req = Newtonsoft.Json.JsonConvert.SerializeObject(reqdic);
|
|
|
LogHelper.Instance.WriteLog(req, "好哒获取文件令牌接口");
|
|
|
- Dictionary<string, string> headdic = GetHeader(req, BrandId);
|
|
|
+ Dictionary<string, string> headdic = GetHeader(req, BrandId, AgentTag);
|
|
|
string head = Newtonsoft.Json.JsonConvert.SerializeObject(headdic);
|
|
|
LogHelper.Instance.WriteLog("请求头\n" + head, "好哒获取文件令牌接口");
|
|
|
LogHelper.Instance.WriteLog("请求参数\n" + req, "好哒获取文件令牌接口");
|
|
@@ -1009,7 +1017,7 @@ namespace MySystem
|
|
|
/// <param name="token">上传图片凭证token</param>
|
|
|
/// <param name="value">图片路径</param>
|
|
|
/// <returns></returns>
|
|
|
- public string ReturnFileName(string token, string value, int BrandId = 0)
|
|
|
+ public string ReturnFileName(string token, string value, int BrandId = 0, string AgentTag = "1")
|
|
|
{
|
|
|
var BoxRequestUrl = HaodaUnionParam.BoxRequestUrl;
|
|
|
if (BrandId == 1) BoxRequestUrl = HaodaParam.BoxRequestUrl;
|