|
@@ -32,11 +32,11 @@ namespace MySystem
|
|
// string BrhCode = "001040";
|
|
// string BrhCode = "001040";
|
|
|
|
|
|
//生产环境
|
|
//生产环境
|
|
- string BoxRequestUrl = "https://openapi.iboxpay.com";
|
|
|
|
- string BoxAppId = "AP7175619323825451008";
|
|
|
|
- string BoxAppSecret = "hUfR53gdjyfiZTBR5bILanMqRD1dXD7y";
|
|
|
|
- string BoxPublicKey = "";
|
|
|
|
- public static string BrhCode = "030145";
|
|
|
|
|
|
+ // string BoxRequestUrl = "https://openapi.iboxpay.com";
|
|
|
|
+ // string BoxAppId = "AP7175619323825451008";
|
|
|
|
+ // string BoxAppSecret = "hUfR53gdjyfiZTBR5bILanMqRD1dXD7y";
|
|
|
|
+ // string BoxPublicKey = "";
|
|
|
|
+ // public static string BrhCode = "030145";
|
|
|
|
|
|
// string BoxRequestUrl = "https://openapi.iboxpay.com";
|
|
// string BoxRequestUrl = "https://openapi.iboxpay.com";
|
|
// string BoxAppId = "AP8322645764893728768";
|
|
// string BoxAppId = "AP8322645764893728768";
|
|
@@ -50,15 +50,21 @@ namespace MySystem
|
|
/// </summary>
|
|
/// </summary>
|
|
/// <param name="request"></param>
|
|
/// <param name="request"></param>
|
|
/// <returns></returns>
|
|
/// <returns></returns>
|
|
- public string AddNewMerchant(AddNewMerchant request)
|
|
|
|
|
|
+ public string AddNewMerchant(AddNewMerchant request, int BrandId = 0)
|
|
{
|
|
{
|
|
- request.brh = BrhCode;
|
|
|
|
- // request.oprInvitedCode = "T1715836";
|
|
|
|
|
|
+ var BoxRequestUrl = HaodaUnionParam.BoxRequestUrl;
|
|
|
|
+ if (BrandId == 1)
|
|
|
|
+ {
|
|
|
|
+ BoxRequestUrl = HaodaParam.BoxRequestUrl;
|
|
|
|
+ request.oprInvitedCode = "T1715836";
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // request.brh = BrhCode;
|
|
LogHelper.Instance.WriteLog(DateTime.Now.ToString(), "好哒新创建商户");
|
|
LogHelper.Instance.WriteLog(DateTime.Now.ToString(), "好哒新创建商户");
|
|
|
|
|
|
string req = Newtonsoft.Json.JsonConvert.SerializeObject(request);
|
|
string req = Newtonsoft.Json.JsonConvert.SerializeObject(request);
|
|
LogHelper.Instance.WriteLog(req, "好哒新创建商户");
|
|
LogHelper.Instance.WriteLog(req, "好哒新创建商户");
|
|
- Dictionary<string, string> headdic = GetHeader(req);
|
|
|
|
|
|
+ Dictionary<string, string> headdic = GetHeader(req, BrandId);
|
|
string head = Newtonsoft.Json.JsonConvert.SerializeObject(headdic);
|
|
string head = Newtonsoft.Json.JsonConvert.SerializeObject(headdic);
|
|
LogHelper.Instance.WriteLog("请求头\n" + head, "好哒新创建商户");
|
|
LogHelper.Instance.WriteLog("请求头\n" + head, "好哒新创建商户");
|
|
LogHelper.Instance.WriteLog("请求参数\n" + req, "好哒新创建商户");
|
|
LogHelper.Instance.WriteLog("请求参数\n" + req, "好哒新创建商户");
|
|
@@ -75,8 +81,11 @@ namespace MySystem
|
|
/// <param name="instId">机构编号</param>
|
|
/// <param name="instId">机构编号</param>
|
|
/// <param name="mchtNo">收款商户号</param>
|
|
/// <param name="mchtNo">收款商户号</param>
|
|
/// <returns></returns>
|
|
/// <returns></returns>
|
|
- public string QueryMerchantStatus(string instId, string mchtNo)
|
|
|
|
|
|
+ public string QueryMerchantStatus(string instId, string mchtNo, int BrandId = 0)
|
|
{
|
|
{
|
|
|
|
+ var BoxRequestUrl = HaodaUnionParam.BoxRequestUrl;
|
|
|
|
+ if (BrandId == 1) BoxRequestUrl = HaodaParam.BoxRequestUrl;
|
|
|
|
+
|
|
LogHelper.Instance.WriteLog(DateTime.Now.ToString(), "好哒查询商户审核状态");
|
|
LogHelper.Instance.WriteLog(DateTime.Now.ToString(), "好哒查询商户审核状态");
|
|
Dictionary<string, object> reqdic = new Dictionary<string, object>();
|
|
Dictionary<string, object> reqdic = new Dictionary<string, object>();
|
|
reqdic.Add("instId", instId);
|
|
reqdic.Add("instId", instId);
|
|
@@ -84,7 +93,7 @@ namespace MySystem
|
|
|
|
|
|
string req = Newtonsoft.Json.JsonConvert.SerializeObject(reqdic);
|
|
string req = Newtonsoft.Json.JsonConvert.SerializeObject(reqdic);
|
|
LogHelper.Instance.WriteLog(req, "好哒查询商户审核状态");
|
|
LogHelper.Instance.WriteLog(req, "好哒查询商户审核状态");
|
|
- Dictionary<string, string> headdic = GetHeader(req);
|
|
|
|
|
|
+ Dictionary<string, string> headdic = GetHeader(req, BrandId);
|
|
string head = Newtonsoft.Json.JsonConvert.SerializeObject(headdic);
|
|
string head = Newtonsoft.Json.JsonConvert.SerializeObject(headdic);
|
|
LogHelper.Instance.WriteLog("请求头\n" + head, "好哒查询商户审核状态");
|
|
LogHelper.Instance.WriteLog("请求头\n" + head, "好哒查询商户审核状态");
|
|
LogHelper.Instance.WriteLog("请求参数\n" + req, "好哒查询商户审核状态");
|
|
LogHelper.Instance.WriteLog("请求参数\n" + req, "好哒查询商户审核状态");
|
|
@@ -101,15 +110,18 @@ namespace MySystem
|
|
/// <param name="mchtNo">慧掌柜商户号</param>
|
|
/// <param name="mchtNo">慧掌柜商户号</param>
|
|
/// <param name="storeNo">慧掌柜门店号</param>
|
|
/// <param name="storeNo">慧掌柜门店号</param>
|
|
/// <returns></returns>
|
|
/// <returns></returns>
|
|
- public string QueryAuthStatus(string mchtNo, string storeNo)
|
|
|
|
|
|
+ public string QueryAuthStatus(string mchtNo, string storeNo, int BrandId = 0)
|
|
{
|
|
{
|
|
|
|
+ var BoxRequestUrl = HaodaUnionParam.BoxRequestUrl;
|
|
|
|
+ if (BrandId == 1) BoxRequestUrl = HaodaParam.BoxRequestUrl;
|
|
|
|
+
|
|
LogHelper.Instance.WriteLog(DateTime.Now.ToString(), "好哒查询实名认证状态");
|
|
LogHelper.Instance.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); // 慧掌柜门店号
|
|
string req = Newtonsoft.Json.JsonConvert.SerializeObject(reqdic);
|
|
string req = Newtonsoft.Json.JsonConvert.SerializeObject(reqdic);
|
|
LogHelper.Instance.WriteLog(req, "好哒查询实名认证状态");
|
|
LogHelper.Instance.WriteLog(req, "好哒查询实名认证状态");
|
|
- Dictionary<string, string> headdic = GetHeader(req);
|
|
|
|
|
|
+ Dictionary<string, string> headdic = GetHeader(req, BrandId);
|
|
string head = Newtonsoft.Json.JsonConvert.SerializeObject(headdic);
|
|
string head = Newtonsoft.Json.JsonConvert.SerializeObject(headdic);
|
|
LogHelper.Instance.WriteLog("请求头\n" + head, "好哒查询实名认证状态");
|
|
LogHelper.Instance.WriteLog("请求头\n" + head, "好哒查询实名认证状态");
|
|
LogHelper.Instance.WriteLog("请求参数\n" + req, "好哒查询实名认证状态");
|
|
LogHelper.Instance.WriteLog("请求参数\n" + req, "好哒查询实名认证状态");
|
|
@@ -126,15 +138,18 @@ namespace MySystem
|
|
/// <param name="mchtNo">慧掌柜商户号</param>
|
|
/// <param name="mchtNo">慧掌柜商户号</param>
|
|
/// <param name="storeNo">慧掌柜门店号</param>
|
|
/// <param name="storeNo">慧掌柜门店号</param>
|
|
/// <returns></returns>
|
|
/// <returns></returns>
|
|
- public string QueryAuthQRcode(string mchtNo, string storeNo)
|
|
|
|
|
|
+ public string QueryAuthQRcode(string mchtNo, string storeNo, int BrandId = 0)
|
|
{
|
|
{
|
|
|
|
+ var BoxRequestUrl = HaodaUnionParam.BoxRequestUrl;
|
|
|
|
+ if (BrandId == 1) BoxRequestUrl = HaodaParam.BoxRequestUrl;
|
|
|
|
+
|
|
LogHelper.Instance.WriteLog(DateTime.Now.ToString(), "好哒查询实名认证二维码");
|
|
LogHelper.Instance.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); // 慧掌柜门店号
|
|
string req = Newtonsoft.Json.JsonConvert.SerializeObject(reqdic);
|
|
string req = Newtonsoft.Json.JsonConvert.SerializeObject(reqdic);
|
|
LogHelper.Instance.WriteLog(req, "好哒查询实名认证二维码");
|
|
LogHelper.Instance.WriteLog(req, "好哒查询实名认证二维码");
|
|
- Dictionary<string, string> headdic = GetHeader(req);
|
|
|
|
|
|
+ Dictionary<string, string> headdic = GetHeader(req, BrandId);
|
|
string head = Newtonsoft.Json.JsonConvert.SerializeObject(headdic);
|
|
string head = Newtonsoft.Json.JsonConvert.SerializeObject(headdic);
|
|
LogHelper.Instance.WriteLog("请求头\n" + head, "好哒查询实名认证二维码");
|
|
LogHelper.Instance.WriteLog("请求头\n" + head, "好哒查询实名认证二维码");
|
|
LogHelper.Instance.WriteLog("请求参数\n" + req, "好哒查询实名认证二维码");
|
|
LogHelper.Instance.WriteLog("请求参数\n" + req, "好哒查询实名认证二维码");
|
|
@@ -159,8 +174,11 @@ namespace MySystem
|
|
/// <param name="subAppIdType">对应的类型,默认为公众号, SUBSCRIPTION: 公众号 MINI_PROGRAM: 小程序</param>
|
|
/// <param name="subAppIdType">对应的类型,默认为公众号, SUBSCRIPTION: 公众号 MINI_PROGRAM: 小程序</param>
|
|
/// <param name="ledgerModel">分账类型:1不分账 2分账,注意只有开通了分账才能传这个字段</param>
|
|
/// <param name="ledgerModel">分账类型:1不分账 2分账,注意只有开通了分账才能传这个字段</param>
|
|
/// <returns></returns>
|
|
/// <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)
|
|
|
|
|
|
+ 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)
|
|
{
|
|
{
|
|
|
|
+ var BoxRequestUrl = HaodaUnionParam.BoxRequestUrl;
|
|
|
|
+ if (BrandId == 1) BoxRequestUrl = HaodaParam.BoxRequestUrl;
|
|
|
|
+
|
|
LogHelper.Instance.WriteLog(DateTime.Now.ToString(), "好哒微信公众号和小程序支付");
|
|
LogHelper.Instance.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); //盒子的商户编号
|
|
@@ -176,7 +194,7 @@ namespace MySystem
|
|
|
|
|
|
string req = Newtonsoft.Json.JsonConvert.SerializeObject(reqdic);
|
|
string req = Newtonsoft.Json.JsonConvert.SerializeObject(reqdic);
|
|
LogHelper.Instance.WriteLog(req, "好哒微信公众号和小程序支付");
|
|
LogHelper.Instance.WriteLog(req, "好哒微信公众号和小程序支付");
|
|
- Dictionary<string, string> headdic = GetHeader(req);
|
|
|
|
|
|
+ Dictionary<string, string> headdic = GetHeader(req, BrandId);
|
|
string head = Newtonsoft.Json.JsonConvert.SerializeObject(headdic);
|
|
string head = Newtonsoft.Json.JsonConvert.SerializeObject(headdic);
|
|
LogHelper.Instance.WriteLog("请求头\n" + head, "好哒微信公众号和小程序支付");
|
|
LogHelper.Instance.WriteLog("请求头\n" + head, "好哒微信公众号和小程序支付");
|
|
LogHelper.Instance.WriteLog("请求参数\n" + req, "好哒微信公众号和小程序支付");
|
|
LogHelper.Instance.WriteLog("请求参数\n" + req, "好哒微信公众号和小程序支付");
|
|
@@ -198,8 +216,11 @@ namespace MySystem
|
|
/// <param name="subOpenId">支付宝用户标识</param>
|
|
/// <param name="subOpenId">支付宝用户标识</param>
|
|
/// <param name="confirmCode">支付确认码,由4位纯数字组成,每次请求时随机生成</param>
|
|
/// <param name="confirmCode">支付确认码,由4位纯数字组成,每次请求时随机生成</param>
|
|
/// <returns></returns>
|
|
/// <returns></returns>
|
|
- public string Alipay(string mchtNo, string storeNo, string outOrderNo, string transAmount, string callbackUrl, string subOpenId, string confirmCode)
|
|
|
|
|
|
+ public string Alipay(string mchtNo, string storeNo, string outOrderNo, string transAmount, string callbackUrl, string subOpenId, string confirmCode, int BrandId = 0)
|
|
{
|
|
{
|
|
|
|
+ var BoxRequestUrl = HaodaUnionParam.BoxRequestUrl;
|
|
|
|
+ if (BrandId == 1) BoxRequestUrl = HaodaParam.BoxRequestUrl;
|
|
|
|
+
|
|
LogHelper.Instance.WriteLog(DateTime.Now.ToString(), "好哒支付宝服务窗支付");
|
|
LogHelper.Instance.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); //盒子的商户编号
|
|
@@ -212,7 +233,7 @@ namespace MySystem
|
|
|
|
|
|
string req = Newtonsoft.Json.JsonConvert.SerializeObject(reqdic);
|
|
string req = Newtonsoft.Json.JsonConvert.SerializeObject(reqdic);
|
|
LogHelper.Instance.WriteLog(req, "好哒支付宝服务窗支付");
|
|
LogHelper.Instance.WriteLog(req, "好哒支付宝服务窗支付");
|
|
- Dictionary<string, string> headdic = GetHeader(req);
|
|
|
|
|
|
+ Dictionary<string, string> headdic = GetHeader(req, BrandId);
|
|
string head = Newtonsoft.Json.JsonConvert.SerializeObject(headdic);
|
|
string head = Newtonsoft.Json.JsonConvert.SerializeObject(headdic);
|
|
LogHelper.Instance.WriteLog("请求头\n" + head, "好哒支付宝服务窗支付");
|
|
LogHelper.Instance.WriteLog("请求头\n" + head, "好哒支付宝服务窗支付");
|
|
LogHelper.Instance.WriteLog("请求参数\n" + req, "好哒支付宝服务窗支付");
|
|
LogHelper.Instance.WriteLog("请求参数\n" + req, "好哒支付宝服务窗支付");
|
|
@@ -232,8 +253,11 @@ namespace MySystem
|
|
/// <param name="outOrderNo">商户支付订单号</param>
|
|
/// <param name="outOrderNo">商户支付订单号</param>
|
|
/// <param name="refundAmount">退款金额,单位:分</param>
|
|
/// <param name="refundAmount">退款金额,单位:分</param>
|
|
/// <returns></returns>
|
|
/// <returns></returns>
|
|
- public string AggregatedPayRefund(string mchtNo, string storeNo, string outRefundNo, string outOrderNo, string refundAmount)
|
|
|
|
|
|
+ public string AggregatedPayRefund(string mchtNo, string storeNo, string outRefundNo, string outOrderNo, string refundAmount, int BrandId = 0)
|
|
{
|
|
{
|
|
|
|
+ var BoxRequestUrl = HaodaUnionParam.BoxRequestUrl;
|
|
|
|
+ if (BrandId == 1) BoxRequestUrl = HaodaParam.BoxRequestUrl;
|
|
|
|
+
|
|
LogHelper.Instance.WriteLog(DateTime.Now.ToString(), "好哒聚合支付退款");
|
|
LogHelper.Instance.WriteLog(DateTime.Now.ToString(), "好哒聚合支付退款");
|
|
Dictionary<string, object> reqdic = new Dictionary<string, object>();
|
|
Dictionary<string, object> reqdic = new Dictionary<string, object>();
|
|
|
|
|
|
@@ -246,7 +270,7 @@ namespace MySystem
|
|
|
|
|
|
string req = Newtonsoft.Json.JsonConvert.SerializeObject(reqdic);
|
|
string req = Newtonsoft.Json.JsonConvert.SerializeObject(reqdic);
|
|
LogHelper.Instance.WriteLog(req, "好哒聚合支付退款");
|
|
LogHelper.Instance.WriteLog(req, "好哒聚合支付退款");
|
|
- Dictionary<string, string> headdic = GetHeader(req);
|
|
|
|
|
|
+ Dictionary<string, string> headdic = GetHeader(req, BrandId);
|
|
string head = Newtonsoft.Json.JsonConvert.SerializeObject(headdic);
|
|
string head = Newtonsoft.Json.JsonConvert.SerializeObject(headdic);
|
|
LogHelper.Instance.WriteLog("请求头\n" + head, "好哒聚合支付退款");
|
|
LogHelper.Instance.WriteLog("请求头\n" + head, "好哒聚合支付退款");
|
|
LogHelper.Instance.WriteLog("请求参数\n" + req, "好哒聚合支付退款");
|
|
LogHelper.Instance.WriteLog("请求参数\n" + req, "好哒聚合支付退款");
|
|
@@ -263,8 +287,11 @@ namespace MySystem
|
|
/// <param name="mchtNo">慧掌柜商户号(进件接口返回的outMchtNo字段)</param>
|
|
/// <param name="mchtNo">慧掌柜商户号(进件接口返回的outMchtNo字段)</param>
|
|
/// <param name="storeNo">慧掌柜门店号</param>
|
|
/// <param name="storeNo">慧掌柜门店号</param>
|
|
/// <returns></returns>
|
|
/// <returns></returns>
|
|
- public string OpenDivideAccounts(string mchtNo, string storeNo)
|
|
|
|
|
|
+ public string OpenDivideAccounts(string mchtNo, string storeNo, int BrandId = 0)
|
|
{
|
|
{
|
|
|
|
+ var BoxRequestUrl = HaodaUnionParam.BoxRequestUrl;
|
|
|
|
+ if (BrandId == 1) BoxRequestUrl = HaodaParam.BoxRequestUrl;
|
|
|
|
+
|
|
LogHelper.Instance.WriteLog(DateTime.Now.ToString(), "好哒开通分账");
|
|
LogHelper.Instance.WriteLog(DateTime.Now.ToString(), "好哒开通分账");
|
|
Dictionary<string, object> reqdic = new Dictionary<string, object>();
|
|
Dictionary<string, object> reqdic = new Dictionary<string, object>();
|
|
|
|
|
|
@@ -273,7 +300,7 @@ namespace MySystem
|
|
|
|
|
|
string req = Newtonsoft.Json.JsonConvert.SerializeObject(reqdic);
|
|
string req = Newtonsoft.Json.JsonConvert.SerializeObject(reqdic);
|
|
LogHelper.Instance.WriteLog(req, "好哒开通分账");
|
|
LogHelper.Instance.WriteLog(req, "好哒开通分账");
|
|
- Dictionary<string, string> headdic = GetHeader(req);
|
|
|
|
|
|
+ Dictionary<string, string> headdic = GetHeader(req, BrandId);
|
|
string head = Newtonsoft.Json.JsonConvert.SerializeObject(headdic);
|
|
string head = Newtonsoft.Json.JsonConvert.SerializeObject(headdic);
|
|
LogHelper.Instance.WriteLog("请求头\n" + head, "好哒开通分账");
|
|
LogHelper.Instance.WriteLog("请求头\n" + head, "好哒开通分账");
|
|
LogHelper.Instance.WriteLog("请求参数\n" + req, "好哒开通分账");
|
|
LogHelper.Instance.WriteLog("请求参数\n" + req, "好哒开通分账");
|
|
@@ -291,8 +318,11 @@ namespace MySystem
|
|
/// <param name="mchtNo">慧掌柜商户号</param>
|
|
/// <param name="mchtNo">慧掌柜商户号</param>
|
|
/// <param name="storeNo">慧掌柜门店号</param>
|
|
/// <param name="storeNo">慧掌柜门店号</param>
|
|
/// <returns></returns>
|
|
/// <returns></returns>
|
|
- public string DivideAccountsSign(string acctNo, string mchtNo, string storeNo)
|
|
|
|
|
|
+ public string DivideAccountsSign(string acctNo, string mchtNo, string storeNo, int BrandId = 0)
|
|
{
|
|
{
|
|
|
|
+ var BoxRequestUrl = HaodaUnionParam.BoxRequestUrl;
|
|
|
|
+ if (BrandId == 1) BoxRequestUrl = HaodaParam.BoxRequestUrl;
|
|
|
|
+
|
|
LogHelper.Instance.WriteLog(DateTime.Now.ToString(), "好哒分账接收方签约");
|
|
LogHelper.Instance.WriteLog(DateTime.Now.ToString(), "好哒分账接收方签约");
|
|
Dictionary<string, object> reqdic = new Dictionary<string, object>();
|
|
Dictionary<string, object> reqdic = new Dictionary<string, object>();
|
|
reqdic.Add("acctNo", acctNo); // 账户号
|
|
reqdic.Add("acctNo", acctNo); // 账户号
|
|
@@ -300,7 +330,7 @@ namespace MySystem
|
|
reqdic.Add("storeNo", storeNo); // 慧掌柜门店号
|
|
reqdic.Add("storeNo", storeNo); // 慧掌柜门店号
|
|
string req = Newtonsoft.Json.JsonConvert.SerializeObject(reqdic);
|
|
string req = Newtonsoft.Json.JsonConvert.SerializeObject(reqdic);
|
|
LogHelper.Instance.WriteLog(req, "好哒分账接收方签约");
|
|
LogHelper.Instance.WriteLog(req, "好哒分账接收方签约");
|
|
- Dictionary<string, string> headdic = GetHeader(req);
|
|
|
|
|
|
+ Dictionary<string, string> headdic = GetHeader(req, BrandId);
|
|
string head = Newtonsoft.Json.JsonConvert.SerializeObject(headdic);
|
|
string head = Newtonsoft.Json.JsonConvert.SerializeObject(headdic);
|
|
LogHelper.Instance.WriteLog("请求头\n" + head, "好哒分账接收方签约");
|
|
LogHelper.Instance.WriteLog("请求头\n" + head, "好哒分账接收方签约");
|
|
LogHelper.Instance.WriteLog("请求参数\n" + req, "好哒分账接收方签约");
|
|
LogHelper.Instance.WriteLog("请求参数\n" + req, "好哒分账接收方签约");
|
|
@@ -316,13 +346,16 @@ namespace MySystem
|
|
/// </summary>
|
|
/// </summary>
|
|
/// <param name="request"></param>
|
|
/// <param name="request"></param>
|
|
/// <returns></returns>
|
|
/// <returns></returns>
|
|
- public string AddOpenDivideAccounts(AddOpenDivideAccounts request)
|
|
|
|
|
|
+ public string AddOpenDivideAccounts(AddOpenDivideAccounts request, int BrandId = 0)
|
|
{
|
|
{
|
|
|
|
+ var BoxRequestUrl = HaodaUnionParam.BoxRequestUrl;
|
|
|
|
+ if (BrandId == 1) BoxRequestUrl = HaodaParam.BoxRequestUrl;
|
|
|
|
+
|
|
LogHelper.Instance.WriteLog(DateTime.Now.ToString(), "好哒添加分账接收方账户");
|
|
LogHelper.Instance.WriteLog(DateTime.Now.ToString(), "好哒添加分账接收方账户");
|
|
|
|
|
|
string req = Newtonsoft.Json.JsonConvert.SerializeObject(request);
|
|
string req = Newtonsoft.Json.JsonConvert.SerializeObject(request);
|
|
LogHelper.Instance.WriteLog(req, "好哒添加分账接收方账户");
|
|
LogHelper.Instance.WriteLog(req, "好哒添加分账接收方账户");
|
|
- Dictionary<string, string> headdic = GetHeader(req);
|
|
|
|
|
|
+ Dictionary<string, string> headdic = GetHeader(req, BrandId);
|
|
string head = Newtonsoft.Json.JsonConvert.SerializeObject(headdic);
|
|
string head = Newtonsoft.Json.JsonConvert.SerializeObject(headdic);
|
|
LogHelper.Instance.WriteLog("请求头\n" + head, "好哒添加分账接收方账户");
|
|
LogHelper.Instance.WriteLog("请求头\n" + head, "好哒添加分账接收方账户");
|
|
LogHelper.Instance.WriteLog("请求参数\n" + req, "好哒添加分账接收方账户");
|
|
LogHelper.Instance.WriteLog("请求参数\n" + req, "好哒添加分账接收方账户");
|
|
@@ -339,15 +372,18 @@ namespace MySystem
|
|
/// <param name="mchtNo">慧掌柜商户号</param>
|
|
/// <param name="mchtNo">慧掌柜商户号</param>
|
|
/// <param name="orderNo">交易订单号 </param>
|
|
/// <param name="orderNo">交易订单号 </param>
|
|
/// <returns></returns>
|
|
/// <returns></returns>
|
|
- public string QueryOrderDivideAccounts(string mchtNo, string orderNo)
|
|
|
|
|
|
+ public string QueryOrderDivideAccounts(string mchtNo, string orderNo, int BrandId = 0)
|
|
{
|
|
{
|
|
|
|
+ var BoxRequestUrl = HaodaUnionParam.BoxRequestUrl;
|
|
|
|
+ if (BrandId == 1) BoxRequestUrl = HaodaParam.BoxRequestUrl;
|
|
|
|
+
|
|
LogHelper.Instance.WriteLog(DateTime.Now.ToString(), "好哒分账交易详情查询");
|
|
LogHelper.Instance.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("orderNo", orderNo); // 交易订单号
|
|
reqdic.Add("orderNo", orderNo); // 交易订单号
|
|
string req = Newtonsoft.Json.JsonConvert.SerializeObject(reqdic);
|
|
string req = Newtonsoft.Json.JsonConvert.SerializeObject(reqdic);
|
|
LogHelper.Instance.WriteLog(req, "好哒分账交易详情查询");
|
|
LogHelper.Instance.WriteLog(req, "好哒分账交易详情查询");
|
|
- Dictionary<string, string> headdic = GetHeader(req);
|
|
|
|
|
|
+ Dictionary<string, string> headdic = GetHeader(req, BrandId);
|
|
string head = Newtonsoft.Json.JsonConvert.SerializeObject(headdic);
|
|
string head = Newtonsoft.Json.JsonConvert.SerializeObject(headdic);
|
|
LogHelper.Instance.WriteLog("请求头\n" + head, "好哒分账交易详情查询");
|
|
LogHelper.Instance.WriteLog("请求头\n" + head, "好哒分账交易详情查询");
|
|
LogHelper.Instance.WriteLog("请求参数\n" + req, "好哒分账交易详情查询");
|
|
LogHelper.Instance.WriteLog("请求参数\n" + req, "好哒分账交易详情查询");
|
|
@@ -364,13 +400,16 @@ namespace MySystem
|
|
/// <param name="request"></param>
|
|
/// <param name="request"></param>
|
|
/// <returns></returns>
|
|
/// <returns></returns>
|
|
///
|
|
///
|
|
- public string OrderDivideAccounts(OrderDivideAccounts request)
|
|
|
|
|
|
+ public string OrderDivideAccounts(OrderDivideAccounts request, int BrandId = 0)
|
|
{
|
|
{
|
|
|
|
+ var BoxRequestUrl = HaodaUnionParam.BoxRequestUrl;
|
|
|
|
+ if (BrandId == 1) BoxRequestUrl = HaodaParam.BoxRequestUrl;
|
|
|
|
+
|
|
LogHelper.Instance.WriteLog(DateTime.Now.ToString(), "好哒订单分账申请");
|
|
LogHelper.Instance.WriteLog(DateTime.Now.ToString(), "好哒订单分账申请");
|
|
|
|
|
|
string req = Newtonsoft.Json.JsonConvert.SerializeObject(request);
|
|
string req = Newtonsoft.Json.JsonConvert.SerializeObject(request);
|
|
LogHelper.Instance.WriteLog(req, "好哒订单分账申请");
|
|
LogHelper.Instance.WriteLog(req, "好哒订单分账申请");
|
|
- Dictionary<string, string> headdic = GetHeader(req);
|
|
|
|
|
|
+ Dictionary<string, string> headdic = GetHeader(req, BrandId);
|
|
string head = Newtonsoft.Json.JsonConvert.SerializeObject(headdic);
|
|
string head = Newtonsoft.Json.JsonConvert.SerializeObject(headdic);
|
|
LogHelper.Instance.WriteLog("请求头\n" + head, "好哒订单分账申请");
|
|
LogHelper.Instance.WriteLog("请求头\n" + head, "好哒订单分账申请");
|
|
LogHelper.Instance.WriteLog("请求参数\n" + req, "好哒订单分账申请");
|
|
LogHelper.Instance.WriteLog("请求参数\n" + req, "好哒订单分账申请");
|
|
@@ -387,15 +426,18 @@ namespace MySystem
|
|
/// <param name="applyNo">分账批次号</param>
|
|
/// <param name="applyNo">分账批次号</param>
|
|
/// <param name="mchtNo">慧掌柜商户号</param>
|
|
/// <param name="mchtNo">慧掌柜商户号</param>
|
|
/// <returns></returns>
|
|
/// <returns></returns>
|
|
- public string OrderDivideAccountsQuery(string applyNo, string mchtNo)
|
|
|
|
|
|
+ public string OrderDivideAccountsQuery(string applyNo, string mchtNo, int BrandId = 0)
|
|
{
|
|
{
|
|
|
|
+ var BoxRequestUrl = HaodaUnionParam.BoxRequestUrl;
|
|
|
|
+ if (BrandId == 1) BoxRequestUrl = HaodaParam.BoxRequestUrl;
|
|
|
|
+
|
|
LogHelper.Instance.WriteLog(DateTime.Now.ToString(), "好哒订单分账结果查询");
|
|
LogHelper.Instance.WriteLog(DateTime.Now.ToString(), "好哒订单分账结果查询");
|
|
Dictionary<string, object> reqdic = new Dictionary<string, object>();
|
|
Dictionary<string, object> reqdic = new Dictionary<string, object>();
|
|
reqdic.Add("applyNo", applyNo); // 账户号
|
|
reqdic.Add("applyNo", applyNo); // 账户号
|
|
reqdic.Add("mchtNo", mchtNo); // 慧掌柜商户号
|
|
reqdic.Add("mchtNo", mchtNo); // 慧掌柜商户号
|
|
string req = Newtonsoft.Json.JsonConvert.SerializeObject(reqdic);
|
|
string req = Newtonsoft.Json.JsonConvert.SerializeObject(reqdic);
|
|
LogHelper.Instance.WriteLog(req, "好哒订单分账结果查询");
|
|
LogHelper.Instance.WriteLog(req, "好哒订单分账结果查询");
|
|
- Dictionary<string, string> headdic = GetHeader(req);
|
|
|
|
|
|
+ Dictionary<string, string> headdic = GetHeader(req, BrandId);
|
|
string head = Newtonsoft.Json.JsonConvert.SerializeObject(headdic);
|
|
string head = Newtonsoft.Json.JsonConvert.SerializeObject(headdic);
|
|
LogHelper.Instance.WriteLog("请求头\n" + head, "好哒订单分账结果查询");
|
|
LogHelper.Instance.WriteLog("请求头\n" + head, "好哒订单分账结果查询");
|
|
LogHelper.Instance.WriteLog("请求参数\n" + req, "好哒订单分账结果查询");
|
|
LogHelper.Instance.WriteLog("请求参数\n" + req, "好哒订单分账结果查询");
|
|
@@ -411,13 +453,16 @@ namespace MySystem
|
|
/// </summary>
|
|
/// </summary>
|
|
/// <param name="request"></param>
|
|
/// <param name="request"></param>
|
|
/// <returns></returns>
|
|
/// <returns></returns>
|
|
- public string ChangeMerchantCard(ChangeMerchantCard request)
|
|
|
|
|
|
+ public string ChangeMerchantCard(ChangeMerchantCard request, int BrandId = 0)
|
|
{
|
|
{
|
|
|
|
+ var BoxRequestUrl = HaodaUnionParam.BoxRequestUrl;
|
|
|
|
+ if (BrandId == 1) BoxRequestUrl = HaodaParam.BoxRequestUrl;
|
|
|
|
+
|
|
LogHelper.Instance.WriteLog(DateTime.Now.ToString(), "好哒商户修改银行卡");
|
|
LogHelper.Instance.WriteLog(DateTime.Now.ToString(), "好哒商户修改银行卡");
|
|
|
|
|
|
string req = Newtonsoft.Json.JsonConvert.SerializeObject(request);
|
|
string req = Newtonsoft.Json.JsonConvert.SerializeObject(request);
|
|
LogHelper.Instance.WriteLog(req, "好哒商户修改银行卡");
|
|
LogHelper.Instance.WriteLog(req, "好哒商户修改银行卡");
|
|
- Dictionary<string, string> headdic = GetHeader(req);
|
|
|
|
|
|
+ Dictionary<string, string> headdic = GetHeader(req, BrandId);
|
|
string head = Newtonsoft.Json.JsonConvert.SerializeObject(headdic);
|
|
string head = Newtonsoft.Json.JsonConvert.SerializeObject(headdic);
|
|
LogHelper.Instance.WriteLog("请求头\n" + head, "好哒商户修改银行卡");
|
|
LogHelper.Instance.WriteLog("请求头\n" + head, "好哒商户修改银行卡");
|
|
LogHelper.Instance.WriteLog("请求参数\n" + req, "好哒商户修改银行卡");
|
|
LogHelper.Instance.WriteLog("请求参数\n" + req, "好哒商户修改银行卡");
|
|
@@ -434,8 +479,11 @@ namespace MySystem
|
|
/// <param name="mchtNo">收款商户号</param>
|
|
/// <param name="mchtNo">收款商户号</param>
|
|
/// <param name="taskId">任务id</param>
|
|
/// <param name="taskId">任务id</param>
|
|
/// <returns></returns>
|
|
/// <returns></returns>
|
|
- public string QueryChangeCardStatus(string mchtNo, string taskId)
|
|
|
|
|
|
+ public string QueryChangeCardStatus(string mchtNo, string taskId, int BrandId = 0)
|
|
{
|
|
{
|
|
|
|
+ var BoxRequestUrl = HaodaUnionParam.BoxRequestUrl;
|
|
|
|
+ if (BrandId == 1) BoxRequestUrl = HaodaParam.BoxRequestUrl;
|
|
|
|
+
|
|
LogHelper.Instance.WriteLog(DateTime.Now.ToString(), "好哒查询修改银行卡任务审核状态");
|
|
LogHelper.Instance.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);
|
|
@@ -443,7 +491,7 @@ namespace MySystem
|
|
|
|
|
|
string req = Newtonsoft.Json.JsonConvert.SerializeObject(reqdic);
|
|
string req = Newtonsoft.Json.JsonConvert.SerializeObject(reqdic);
|
|
LogHelper.Instance.WriteLog(req, "好哒查询修改银行卡任务审核状态");
|
|
LogHelper.Instance.WriteLog(req, "好哒查询修改银行卡任务审核状态");
|
|
- Dictionary<string, string> headdic = GetHeader(req);
|
|
|
|
|
|
+ Dictionary<string, string> headdic = GetHeader(req, BrandId);
|
|
string head = Newtonsoft.Json.JsonConvert.SerializeObject(headdic);
|
|
string head = Newtonsoft.Json.JsonConvert.SerializeObject(headdic);
|
|
LogHelper.Instance.WriteLog("请求头\n" + head, "好哒查询修改银行卡任务审核状态");
|
|
LogHelper.Instance.WriteLog("请求头\n" + head, "好哒查询修改银行卡任务审核状态");
|
|
LogHelper.Instance.WriteLog("请求参数\n" + req, "好哒查询修改银行卡任务审核状态");
|
|
LogHelper.Instance.WriteLog("请求参数\n" + req, "好哒查询修改银行卡任务审核状态");
|
|
@@ -462,8 +510,11 @@ namespace MySystem
|
|
/// <param name="storeNo">盒子的门店编号</param>
|
|
/// <param name="storeNo">盒子的门店编号</param>
|
|
/// <param name="subAppId">公众号appid或者小程序appid</param>
|
|
/// <param name="subAppId">公众号appid或者小程序appid</param>
|
|
/// <returns></returns>
|
|
/// <returns></returns>
|
|
- public string BindWeChatAppId(string mchtNo, string storeNo, string subAppId)
|
|
|
|
|
|
+ public string BindWeChatAppId(string mchtNo, string storeNo, string subAppId, int BrandId = 0)
|
|
{
|
|
{
|
|
|
|
+ var BoxRequestUrl = HaodaUnionParam.BoxRequestUrl;
|
|
|
|
+ if (BrandId == 1) BoxRequestUrl = HaodaParam.BoxRequestUrl;
|
|
|
|
+
|
|
LogHelper.Instance.WriteLog(DateTime.Now.ToString(), "好哒绑定微信appid接口");
|
|
LogHelper.Instance.WriteLog(DateTime.Now.ToString(), "好哒绑定微信appid接口");
|
|
Dictionary<string, object> reqdic = new Dictionary<string, object>();
|
|
Dictionary<string, object> reqdic = new Dictionary<string, object>();
|
|
|
|
|
|
@@ -473,7 +524,7 @@ namespace MySystem
|
|
|
|
|
|
string req = Newtonsoft.Json.JsonConvert.SerializeObject(reqdic);
|
|
string req = Newtonsoft.Json.JsonConvert.SerializeObject(reqdic);
|
|
LogHelper.Instance.WriteLog(req, "好哒绑定微信appid接口");
|
|
LogHelper.Instance.WriteLog(req, "好哒绑定微信appid接口");
|
|
- Dictionary<string, string> headdic = GetHeader(req);
|
|
|
|
|
|
+ Dictionary<string, string> headdic = GetHeader(req, BrandId);
|
|
string head = Newtonsoft.Json.JsonConvert.SerializeObject(headdic);
|
|
string head = Newtonsoft.Json.JsonConvert.SerializeObject(headdic);
|
|
LogHelper.Instance.WriteLog("请求头\n" + head, "好哒绑定微信appid接口");
|
|
LogHelper.Instance.WriteLog("请求头\n" + head, "好哒绑定微信appid接口");
|
|
LogHelper.Instance.WriteLog("请求参数\n" + req, "好哒绑定微信appid接口");
|
|
LogHelper.Instance.WriteLog("请求参数\n" + req, "好哒绑定微信appid接口");
|
|
@@ -496,8 +547,11 @@ namespace MySystem
|
|
/// <param name="page">当前页数,默认1</param>
|
|
/// <param name="page">当前页数,默认1</param>
|
|
/// <param name="rows">每页大小,默认10,最大500</param>
|
|
/// <param name="rows">每页大小,默认10,最大500</param>
|
|
/// <returns></returns>
|
|
/// <returns></returns>
|
|
- public string QueryAccountList(string mchtNo, string startTime, string endTime, string tradeMchtNo, string cardNo, string settleStatus, string page = "1", string rows = "10")
|
|
|
|
|
|
+ public string QueryAccountList(string mchtNo, string startTime, string endTime, string tradeMchtNo, string cardNo, string settleStatus, string page = "1", string rows = "10", int BrandId = 0)
|
|
{
|
|
{
|
|
|
|
+ var BoxRequestUrl = HaodaUnionParam.BoxRequestUrl;
|
|
|
|
+ if (BrandId == 1) BoxRequestUrl = HaodaParam.BoxRequestUrl;
|
|
|
|
+
|
|
LogHelper.Instance.WriteLog(DateTime.Now.ToString(), "好哒到账记录查询");
|
|
LogHelper.Instance.WriteLog(DateTime.Now.ToString(), "好哒到账记录查询");
|
|
Dictionary<string, object> reqdic = new Dictionary<string, object>();
|
|
Dictionary<string, object> reqdic = new Dictionary<string, object>();
|
|
|
|
|
|
@@ -512,7 +566,7 @@ namespace MySystem
|
|
|
|
|
|
string req = Newtonsoft.Json.JsonConvert.SerializeObject(reqdic);
|
|
string req = Newtonsoft.Json.JsonConvert.SerializeObject(reqdic);
|
|
LogHelper.Instance.WriteLog(req, "好哒到账记录查询");
|
|
LogHelper.Instance.WriteLog(req, "好哒到账记录查询");
|
|
- Dictionary<string, string> headdic = GetHeader(req);
|
|
|
|
|
|
+ Dictionary<string, string> headdic = GetHeader(req, BrandId);
|
|
string head = Newtonsoft.Json.JsonConvert.SerializeObject(headdic);
|
|
string head = Newtonsoft.Json.JsonConvert.SerializeObject(headdic);
|
|
LogHelper.Instance.WriteLog("请求头\n" + head, "好哒到账记录查询");
|
|
LogHelper.Instance.WriteLog("请求头\n" + head, "好哒到账记录查询");
|
|
LogHelper.Instance.WriteLog("请求参数\n" + req, "好哒到账记录查询");
|
|
LogHelper.Instance.WriteLog("请求参数\n" + req, "好哒到账记录查询");
|
|
@@ -529,8 +583,11 @@ namespace MySystem
|
|
/// <param name="mchtNo">商户号</param>
|
|
/// <param name="mchtNo">商户号</param>
|
|
/// <param name="id"></param>
|
|
/// <param name="id"></param>
|
|
/// <returns></returns>
|
|
/// <returns></returns>
|
|
- public string QueryAccountDetail(string mchtNo, string id)
|
|
|
|
|
|
+ public string QueryAccountDetail(string mchtNo, string id, int BrandId = 0)
|
|
{
|
|
{
|
|
|
|
+ var BoxRequestUrl = HaodaUnionParam.BoxRequestUrl;
|
|
|
|
+ if (BrandId == 1) BoxRequestUrl = HaodaParam.BoxRequestUrl;
|
|
|
|
+
|
|
LogHelper.Instance.WriteLog(DateTime.Now.ToString(), "好哒到账记录详情");
|
|
LogHelper.Instance.WriteLog(DateTime.Now.ToString(), "好哒到账记录详情");
|
|
Dictionary<string, object> reqdic = new Dictionary<string, object>();
|
|
Dictionary<string, object> reqdic = new Dictionary<string, object>();
|
|
|
|
|
|
@@ -539,7 +596,7 @@ namespace MySystem
|
|
|
|
|
|
string req = Newtonsoft.Json.JsonConvert.SerializeObject(reqdic);
|
|
string req = Newtonsoft.Json.JsonConvert.SerializeObject(reqdic);
|
|
LogHelper.Instance.WriteLog(req, "好哒到账记录详情");
|
|
LogHelper.Instance.WriteLog(req, "好哒到账记录详情");
|
|
- Dictionary<string, string> headdic = GetHeader(req);
|
|
|
|
|
|
+ Dictionary<string, string> headdic = GetHeader(req, BrandId);
|
|
string head = Newtonsoft.Json.JsonConvert.SerializeObject(headdic);
|
|
string head = Newtonsoft.Json.JsonConvert.SerializeObject(headdic);
|
|
LogHelper.Instance.WriteLog("请求头\n" + head, "好哒到账记录详情");
|
|
LogHelper.Instance.WriteLog("请求头\n" + head, "好哒到账记录详情");
|
|
LogHelper.Instance.WriteLog("请求参数\n" + req, "好哒到账记录详情");
|
|
LogHelper.Instance.WriteLog("请求参数\n" + req, "好哒到账记录详情");
|
|
@@ -556,8 +613,11 @@ namespace MySystem
|
|
/// <param name="mchtNo">商户号</param>
|
|
/// <param name="mchtNo">商户号</param>
|
|
/// <param name="outOrderNo">商户订单号</param>
|
|
/// <param name="outOrderNo">商户订单号</param>
|
|
/// <returns></returns>
|
|
/// <returns></returns>
|
|
- public string QueryTradeDetail(string mchtNo, string outOrderNo)
|
|
|
|
|
|
+ public string QueryTradeDetail(string mchtNo, string outOrderNo, int BrandId = 0)
|
|
{
|
|
{
|
|
|
|
+ var BoxRequestUrl = HaodaUnionParam.BoxRequestUrl;
|
|
|
|
+ if (BrandId == 1) BoxRequestUrl = HaodaParam.BoxRequestUrl;
|
|
|
|
+
|
|
LogHelper.Instance.WriteLog(DateTime.Now.ToString(), "好哒聚合支付查询");
|
|
LogHelper.Instance.WriteLog(DateTime.Now.ToString(), "好哒聚合支付查询");
|
|
Dictionary<string, object> reqdic = new Dictionary<string, object>();
|
|
Dictionary<string, object> reqdic = new Dictionary<string, object>();
|
|
|
|
|
|
@@ -566,7 +626,7 @@ namespace MySystem
|
|
|
|
|
|
string req = Newtonsoft.Json.JsonConvert.SerializeObject(reqdic);
|
|
string req = Newtonsoft.Json.JsonConvert.SerializeObject(reqdic);
|
|
LogHelper.Instance.WriteLog(req, "好哒聚合支付查询");
|
|
LogHelper.Instance.WriteLog(req, "好哒聚合支付查询");
|
|
- Dictionary<string, string> headdic = GetHeader(req);
|
|
|
|
|
|
+ Dictionary<string, string> headdic = GetHeader(req, BrandId);
|
|
string head = Newtonsoft.Json.JsonConvert.SerializeObject(headdic);
|
|
string head = Newtonsoft.Json.JsonConvert.SerializeObject(headdic);
|
|
LogHelper.Instance.WriteLog("请求头\n" + head, "好哒聚合支付查询");
|
|
LogHelper.Instance.WriteLog("请求头\n" + head, "好哒聚合支付查询");
|
|
LogHelper.Instance.WriteLog("请求参数\n" + req, "好哒聚合支付查询");
|
|
LogHelper.Instance.WriteLog("请求参数\n" + req, "好哒聚合支付查询");
|
|
@@ -584,8 +644,11 @@ namespace MySystem
|
|
/// <param name="storeNo">门店编号</param>
|
|
/// <param name="storeNo">门店编号</param>
|
|
/// <param name="outRefundNo">退款订单号</param>
|
|
/// <param name="outRefundNo">退款订单号</param>
|
|
/// <returns></returns>
|
|
/// <returns></returns>
|
|
- public string QueryRefundDetail(string mchtNo, string storeNo, string outRefundNo)
|
|
|
|
|
|
+ public string QueryRefundDetail(string mchtNo, string storeNo, string outRefundNo, int BrandId = 0)
|
|
{
|
|
{
|
|
|
|
+ var BoxRequestUrl = HaodaUnionParam.BoxRequestUrl;
|
|
|
|
+ if (BrandId == 1) BoxRequestUrl = HaodaParam.BoxRequestUrl;
|
|
|
|
+
|
|
LogHelper.Instance.WriteLog(DateTime.Now.ToString(), "好哒退款查询");
|
|
LogHelper.Instance.WriteLog(DateTime.Now.ToString(), "好哒退款查询");
|
|
Dictionary<string, object> reqdic = new Dictionary<string, object>();
|
|
Dictionary<string, object> reqdic = new Dictionary<string, object>();
|
|
|
|
|
|
@@ -595,7 +658,7 @@ namespace MySystem
|
|
|
|
|
|
string req = Newtonsoft.Json.JsonConvert.SerializeObject(reqdic);
|
|
string req = Newtonsoft.Json.JsonConvert.SerializeObject(reqdic);
|
|
LogHelper.Instance.WriteLog(req, "好哒退款查询");
|
|
LogHelper.Instance.WriteLog(req, "好哒退款查询");
|
|
- Dictionary<string, string> headdic = GetHeader(req);
|
|
|
|
|
|
+ Dictionary<string, string> headdic = GetHeader(req, BrandId);
|
|
string head = Newtonsoft.Json.JsonConvert.SerializeObject(headdic);
|
|
string head = Newtonsoft.Json.JsonConvert.SerializeObject(headdic);
|
|
LogHelper.Instance.WriteLog("请求头\n" + head, "好哒退款查询");
|
|
LogHelper.Instance.WriteLog("请求头\n" + head, "好哒退款查询");
|
|
LogHelper.Instance.WriteLog("请求参数\n" + req, "好哒退款查询");
|
|
LogHelper.Instance.WriteLog("请求参数\n" + req, "好哒退款查询");
|
|
@@ -606,8 +669,16 @@ namespace MySystem
|
|
return result;
|
|
return result;
|
|
}
|
|
}
|
|
|
|
|
|
- public Dictionary<string, string> GetHeader(string req)
|
|
|
|
|
|
+ public Dictionary<string, string> GetHeader(string req, int BrandId = 0)
|
|
{
|
|
{
|
|
|
|
+ var BoxAppId = HaodaUnionParam.BoxAppId;
|
|
|
|
+ var BoxAppSecret = HaodaUnionParam.BoxAppSecret;
|
|
|
|
+ if (BrandId == 1)
|
|
|
|
+ {
|
|
|
|
+ BoxAppId = HaodaParam.BoxAppId;
|
|
|
|
+ BoxAppSecret = HaodaParam.BoxAppSecret;
|
|
|
|
+ }
|
|
|
|
+
|
|
Dictionary<string, string> headdic = new Dictionary<string, string>();
|
|
Dictionary<string, string> headdic = new Dictionary<string, string>();
|
|
string timestamp = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
|
|
string timestamp = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
|
|
// headdic.Add("appid", BoxAppId);//开发者id
|
|
// headdic.Add("appid", BoxAppId);//开发者id
|
|
@@ -628,8 +699,11 @@ namespace MySystem
|
|
return sign;
|
|
return sign;
|
|
}
|
|
}
|
|
|
|
|
|
- public bool VerifySign(string toSignStr, string signStr)
|
|
|
|
|
|
+ public bool VerifySign(string toSignStr, string signStr, int BrandId = 0)
|
|
{
|
|
{
|
|
|
|
+ var BoxPublicKey = HaodaUnionParam.BoxPublicKey;
|
|
|
|
+ if (BrandId == 1) BoxPublicKey = HaodaParam.BoxPublicKey;
|
|
|
|
+
|
|
byte[] toSignByte = Encoding.Default.GetBytes(toSignStr);
|
|
byte[] toSignByte = Encoding.Default.GetBytes(toSignStr);
|
|
byte[] signByte = Convert.FromBase64String(signStr);
|
|
byte[] signByte = Convert.FromBase64String(signStr);
|
|
var toKey = Convert.FromBase64String(BoxPublicKey);
|
|
var toKey = Convert.FromBase64String(BoxPublicKey);
|
|
@@ -645,8 +719,11 @@ namespace MySystem
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- public string SignData(string toSignStr)
|
|
|
|
|
|
+ public string SignData(string toSignStr, int BrandId = 0)
|
|
{
|
|
{
|
|
|
|
+ var BoxPublicKey = HaodaUnionParam.BoxPublicKey;
|
|
|
|
+ if (BrandId == 1) BoxPublicKey = HaodaParam.BoxPublicKey;
|
|
|
|
+
|
|
byte[] toSignByte = Encoding.UTF8.GetBytes(toSignStr);
|
|
byte[] toSignByte = Encoding.UTF8.GetBytes(toSignStr);
|
|
var toKey = Convert.FromBase64String(BoxPublicKey);
|
|
var toKey = Convert.FromBase64String(BoxPublicKey);
|
|
var rsaroot = RSA.Create();
|
|
var rsaroot = RSA.Create();
|
|
@@ -725,8 +802,11 @@ namespace MySystem
|
|
/// <param name="fileName">文件名</param>
|
|
/// <param name="fileName">文件名</param>
|
|
/// <param name="action">操作类型 0 上传图片</param>
|
|
/// <param name="action">操作类型 0 上传图片</param>
|
|
/// <returns></returns>
|
|
/// <returns></returns>
|
|
- public string GetToken(string fileName, string action)
|
|
|
|
|
|
+ public string GetToken(string fileName, string action, int BrandId = 0)
|
|
{
|
|
{
|
|
|
|
+ var BoxRequestUrl = HaodaUnionParam.BoxRequestUrl;
|
|
|
|
+ if (BrandId == 1) BoxRequestUrl = HaodaParam.BoxRequestUrl;
|
|
|
|
+
|
|
LogHelper.Instance.WriteLog(DateTime.Now.ToString(), "好哒获取文件令牌接口");
|
|
LogHelper.Instance.WriteLog(DateTime.Now.ToString(), "好哒获取文件令牌接口");
|
|
Dictionary<string, object> reqdic = new Dictionary<string, object>();
|
|
Dictionary<string, object> reqdic = new Dictionary<string, object>();
|
|
|
|
|
|
@@ -735,7 +815,7 @@ namespace MySystem
|
|
|
|
|
|
string req = Newtonsoft.Json.JsonConvert.SerializeObject(reqdic);
|
|
string req = Newtonsoft.Json.JsonConvert.SerializeObject(reqdic);
|
|
LogHelper.Instance.WriteLog(req, "好哒获取文件令牌接口");
|
|
LogHelper.Instance.WriteLog(req, "好哒获取文件令牌接口");
|
|
- Dictionary<string, string> headdic = GetHeader(req);
|
|
|
|
|
|
+ Dictionary<string, string> headdic = GetHeader(req, BrandId);
|
|
string head = Newtonsoft.Json.JsonConvert.SerializeObject(headdic);
|
|
string head = Newtonsoft.Json.JsonConvert.SerializeObject(headdic);
|
|
LogHelper.Instance.WriteLog("请求头\n" + head, "好哒获取文件令牌接口");
|
|
LogHelper.Instance.WriteLog("请求头\n" + head, "好哒获取文件令牌接口");
|
|
LogHelper.Instance.WriteLog("请求参数\n" + req, "好哒获取文件令牌接口");
|
|
LogHelper.Instance.WriteLog("请求参数\n" + req, "好哒获取文件令牌接口");
|
|
@@ -865,8 +945,11 @@ namespace MySystem
|
|
/// <param name="token">上传图片凭证token</param>
|
|
/// <param name="token">上传图片凭证token</param>
|
|
/// <param name="value">图片路径</param>
|
|
/// <param name="value">图片路径</param>
|
|
/// <returns></returns>
|
|
/// <returns></returns>
|
|
- public string ReturnFileName(string token, string value)
|
|
|
|
|
|
+ public string ReturnFileName(string token, string value, int BrandId = 0)
|
|
{
|
|
{
|
|
|
|
+ var BoxRequestUrl = HaodaUnionParam.BoxRequestUrl;
|
|
|
|
+ if (BrandId == 1) BoxRequestUrl = HaodaParam.BoxRequestUrl;
|
|
|
|
+
|
|
Dictionary<string, string> file = new Dictionary<string, string>();
|
|
Dictionary<string, string> file = new Dictionary<string, string>();
|
|
file.Add("fileName", value.Substring(value.LastIndexOf("/")).Trim('/'));
|
|
file.Add("fileName", value.Substring(value.LastIndexOf("/")).Trim('/'));
|
|
if (string.IsNullOrEmpty(value.Split(',')[0]))
|
|
if (string.IsNullOrEmpty(value.Split(',')[0]))
|