|
@@ -59,6 +59,15 @@ namespace MySystem
|
|
MerchantAddInfo info = db.MerchantAddInfo.FirstOrDefault(m => m.Id == Id) ?? new MerchantAddInfo();
|
|
MerchantAddInfo info = db.MerchantAddInfo.FirstOrDefault(m => m.Id == Id) ?? new MerchantAddInfo();
|
|
string result = AlipayFunctionForHD.Instance.AuthOrderCreate(info, info.AlipayAuthToken);
|
|
string result = AlipayFunctionForHD.Instance.AuthOrderCreate(info, info.AlipayAuthToken);
|
|
JsonData jsonObj = JsonMapper.ToObject(result);
|
|
JsonData jsonObj = JsonMapper.ToObject(result);
|
|
|
|
+
|
|
|
|
+ Dictionary<string, object> reqdic = new Dictionary<string, object>();
|
|
|
|
+ reqdic.Add("Id", Id); // 商户Id
|
|
|
|
+ string req = Newtonsoft.Json.JsonConvert.SerializeObject(reqdic);
|
|
|
|
+ LogHelper.Instance.WriteLog(req, "提交支付宝商户意愿申请单");
|
|
|
|
+ Dictionary<string, string> headdic = HaoDaHelper.Instance.GetHeader(req);
|
|
|
|
+ string head = Newtonsoft.Json.JsonConvert.SerializeObject(headdic);
|
|
|
|
+ LogHelper.Instance.WriteLog("请求参数\n" + req, "提交支付宝商户意愿申请单");
|
|
|
|
+
|
|
LogHelper.Instance.WriteLog(result, "提交支付宝商户意愿申请单");
|
|
LogHelper.Instance.WriteLog(result, "提交支付宝商户意愿申请单");
|
|
if (jsonObj["alipay_merchant_indirect_authorder_create_response"]["code"].ToString() == "10000")
|
|
if (jsonObj["alipay_merchant_indirect_authorder_create_response"]["code"].ToString() == "10000")
|
|
{
|
|
{
|
|
@@ -95,6 +104,16 @@ namespace MySystem
|
|
MerchantAddInfo info = db.MerchantAddInfo.FirstOrDefault(m => m.Id == Id) ?? new MerchantAddInfo();
|
|
MerchantAddInfo info = db.MerchantAddInfo.FirstOrDefault(m => m.Id == Id) ?? new MerchantAddInfo();
|
|
string result = AlipayFunctionForHD.Instance.AuthOrderQuery(OrderNo);
|
|
string result = AlipayFunctionForHD.Instance.AuthOrderQuery(OrderNo);
|
|
JsonData jsonObj = JsonMapper.ToObject(result);
|
|
JsonData jsonObj = JsonMapper.ToObject(result);
|
|
|
|
+
|
|
|
|
+ Dictionary<string, object> reqdic = new Dictionary<string, object>();
|
|
|
|
+ reqdic.Add("Id", Id); // 商户Id
|
|
|
|
+ reqdic.Add("OrderNo", OrderNo); // 商户Id
|
|
|
|
+ string req = Newtonsoft.Json.JsonConvert.SerializeObject(reqdic);
|
|
|
|
+ LogHelper.Instance.WriteLog(req, "查询支付宝商户意愿申请状态");
|
|
|
|
+ Dictionary<string, string> headdic = HaoDaHelper.Instance.GetHeader(req);
|
|
|
|
+ string head = Newtonsoft.Json.JsonConvert.SerializeObject(headdic);
|
|
|
|
+ LogHelper.Instance.WriteLog("请求参数\n" + req, "查询支付宝商户意愿申请状态");
|
|
|
|
+
|
|
LogHelper.Instance.WriteLog(result, "查询支付宝商户意愿申请状态");
|
|
LogHelper.Instance.WriteLog(result, "查询支付宝商户意愿申请状态");
|
|
if (jsonObj["alipay_merchant_indirect_authorder_querystatus_response"]["code"].ToString() == "10000")
|
|
if (jsonObj["alipay_merchant_indirect_authorder_querystatus_response"]["code"].ToString() == "10000")
|
|
{
|
|
{
|
|
@@ -161,6 +180,15 @@ namespace MySystem
|
|
WebCMSEntities db = new WebCMSEntities();
|
|
WebCMSEntities db = new WebCMSEntities();
|
|
MerchantAddInfo info = db.MerchantAddInfo.FirstOrDefault(m => m.Id == Id) ?? new MerchantAddInfo();
|
|
MerchantAddInfo info = db.MerchantAddInfo.FirstOrDefault(m => m.Id == Id) ?? new MerchantAddInfo();
|
|
string result = WeChatFunctionForHD.Instance.MerchantApply(info);
|
|
string result = WeChatFunctionForHD.Instance.MerchantApply(info);
|
|
|
|
+
|
|
|
|
+ Dictionary<string, object> reqdic = new Dictionary<string, object>();
|
|
|
|
+ reqdic.Add("Id", Id); // 商户Id
|
|
|
|
+ string req = Newtonsoft.Json.JsonConvert.SerializeObject(reqdic);
|
|
|
|
+ LogHelper.Instance.WriteLog(req, "提交微信商户意愿申请单");
|
|
|
|
+ Dictionary<string, string> headdic = HaoDaHelper.Instance.GetHeader(req);
|
|
|
|
+ string head = Newtonsoft.Json.JsonConvert.SerializeObject(headdic);
|
|
|
|
+ LogHelper.Instance.WriteLog("请求参数\n" + req, "提交微信商户意愿申请单");
|
|
|
|
+
|
|
LogHelper.Instance.WriteLog(result, "提交微信商户意愿申请单");
|
|
LogHelper.Instance.WriteLog(result, "提交微信商户意愿申请单");
|
|
if (result.Contains("\"applyment_id\":"))
|
|
if (result.Contains("\"applyment_id\":"))
|
|
{
|
|
{
|
|
@@ -197,6 +225,16 @@ namespace MySystem
|
|
WebCMSEntities db = new WebCMSEntities();
|
|
WebCMSEntities db = new WebCMSEntities();
|
|
MerchantAddInfo info = db.MerchantAddInfo.FirstOrDefault(m => m.Id == Id) ?? new MerchantAddInfo();
|
|
MerchantAddInfo info = db.MerchantAddInfo.FirstOrDefault(m => m.Id == Id) ?? new MerchantAddInfo();
|
|
string result = WeChatFunctionForHD.Instance.QueryMerchant(ApplymentId);
|
|
string result = WeChatFunctionForHD.Instance.QueryMerchant(ApplymentId);
|
|
|
|
+
|
|
|
|
+ Dictionary<string, object> reqdic = new Dictionary<string, object>();
|
|
|
|
+ reqdic.Add("Id", Id); // 商户Id
|
|
|
|
+ reqdic.Add("ApplymentId", ApplymentId); // 商户Id
|
|
|
|
+ string req = Newtonsoft.Json.JsonConvert.SerializeObject(reqdic);
|
|
|
|
+ LogHelper.Instance.WriteLog(req, "提交微信商户意愿申请单");
|
|
|
|
+ Dictionary<string, string> headdic = HaoDaHelper.Instance.GetHeader(req);
|
|
|
|
+ string head = Newtonsoft.Json.JsonConvert.SerializeObject(headdic);
|
|
|
|
+ LogHelper.Instance.WriteLog("请求参数\n" + req, "提交微信商户意愿申请单");
|
|
|
|
+
|
|
JsonData jsonObj = JsonMapper.ToObject(result);
|
|
JsonData jsonObj = JsonMapper.ToObject(result);
|
|
if (jsonObj["applyment_state"].ToString() == "APPLYMENT_STATE_WAITTING_FOR_CONFIRM_CONTACT")
|
|
if (jsonObj["applyment_state"].ToString() == "APPLYMENT_STATE_WAITTING_FOR_CONFIRM_CONTACT")
|
|
{
|
|
{
|