微信支付api中统一下单怎么写
api上只写了接口地址https://api.mch.weixin.qq.com/pay/unifiedorder和一些参数那我怎么使用直接访问https://api.m...
api上只写了接口地址https://api.mch.weixin.qq.com/pay/unifiedorder
和一些参数 那我怎么使用 直接
访问https://api.mch.weixin.qq.com/pay/unifiedorder?参数1=参数1&参数2=参数2? 展开
和一些参数 那我怎么使用 直接
访问https://api.mch.weixin.qq.com/pay/unifiedorder?参数1=参数1&参数2=参数2? 展开
展开全部
ictionary<String, String> requestParams = new Dictionary<string, string>();
requestParams.Add("appid", AppID);
requestParams.Add("attach", record.No);
requestParams.Add("body", record.Memo);
requestParams.Add("mch_id", mch_id);
requestParams.Add("nonce_str", TextHelper.CreateRandString(32));
requestParams.Add("notify_url", CallbackUrl + "?id=" + record.Id + "&userid=" + record.UsersId + "&amount=" + record.Amount);
requestParams.Add("out_trade_no", record.No);
requestParams.Add("spbill_create_ip", RemoteIpAddress);
requestParams.Add("time_expire", DateTime.Now.AddMinutes(30).ToString("yyyyMMddHHmmss"));//订单失效时间30分钟
requestParams.Add("total_fee", record.Amount.ToString());
requestParams.Add("fee_type", "1");
requestParams.Add("trade_type", "APP");
requestParams.Add("sign", CreateSign(requestParams, true));
String content = HttpHelper.Post("https://api.mch.weixin.qq.com/pay/unifiedorder", CreateXml(requestParams));
requestParams.Add("appid", AppID);
requestParams.Add("attach", record.No);
requestParams.Add("body", record.Memo);
requestParams.Add("mch_id", mch_id);
requestParams.Add("nonce_str", TextHelper.CreateRandString(32));
requestParams.Add("notify_url", CallbackUrl + "?id=" + record.Id + "&userid=" + record.UsersId + "&amount=" + record.Amount);
requestParams.Add("out_trade_no", record.No);
requestParams.Add("spbill_create_ip", RemoteIpAddress);
requestParams.Add("time_expire", DateTime.Now.AddMinutes(30).ToString("yyyyMMddHHmmss"));//订单失效时间30分钟
requestParams.Add("total_fee", record.Amount.ToString());
requestParams.Add("fee_type", "1");
requestParams.Add("trade_type", "APP");
requestParams.Add("sign", CreateSign(requestParams, true));
String content = HttpHelper.Post("https://api.mch.weixin.qq.com/pay/unifiedorder", CreateXml(requestParams));
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询