/// <summary>
/// 获取审核结果
/// </summary>
/// <param name="business_code">业务申请编号</param>
/// <param name="applyment_id">微信返回的申请编号</param>
/// <returns></returns>
public static string Getstate(string business_code,string applyment_id)
{
WxPayDataToXiaoWei inputObj = new WxPayDataToXiaoWei();
inputObj.SetValue("version", "1.0");//接口版本号
inputObj.SetValue("mch_id", weixinConfig.MchID);//商户号
inputObj.SetValue("nonce_str", Guid.NewGuid().ToString().Replace("-", ""));//随机字符串
inputObj.SetValue("business_code", business_code);//
inputObj.SetValue("applyment_id", applyment_id);//
inputObj.SetValue("sign_type", "HMAC-SHA256");//签名类型
inputObj.SetValue("sign", inputObj.MakeSign(weixinConfig.Key));//签名
string xml = inputObj.ToXml();
string url = "https://api.mch.weixin.qq.com/applyment/micro/getstate";
int timeOut = 10;
LogHelper.Error("Getstate:"+inputObj.GetValue("sign").ToString());
string response = WeixinXiaoweiService.Post(xml, url, true,true, timeOut);//调用HTTP通信接口以提交数据到API
inputObj = new WxPayDataToXiaoWei();
inputObj.FromXml(response);
var model = ConfigDbTable.DbWeixinApplyment.SingleOrDefault(p => p.business_code == business_code && p.applyment_id == applyment_id);
if (inputObj.GetValue("return_code").ToString() == "SUCCESS")
{
model.applyment_state_desc = inputObj.GetValue("applyment_state_desc").ToString();
if (inputObj.GetValue("applyment_state").ToString() == "REJECTED") {
//被驳回
model.audit_detail = JsonConvert.SerializeObject(inputObj.GetValue("audit_detail").ToString());
}
}
ConfigDbTable.DbWeixinApplyment.Update(model);
return ProtocolManager.GetPackage(PackageReturnCode.OK, response);
}
相关文章:
- shop--12.微信测试号的申请和获取微信用户信息 2021-11-12
- 微信小程序~获取网络状态 2021-11-19
- 微信小程序 --- 获取网络状态 2021-07-14
- 微信支付:小微商户申请入驻第一步:平台证书序列号的获取 2021-12-08
- 微信小商店开放个人申请 2021-09-04
- 微信小程序云开发--微信支付商户号,商户**等的获取 2021-08-12
- 微信小程序申请 2021-12-26