微信支付后,订单查询,为什么直接硬编码代入正确的订单号调用接口,返回微信订单号非法?
try { //20240917194547930997421516546573 //string result = OrderQuery.Run(transaction_id.Text, out_trade_no.Text);//通过从页面上获取文本框中取值代入查询成功。 通过如下面方式代入接口查询返回结果提示微信订单号非法 string aa = "20240917194547930997421516546573"; string bb = "20240917194547930997421516546573"; string result = OrderQuery.Run(aa, bb); Response.Write("<span style='color:#00CD00;font-size:20px'>" + result + "</span>"); } catch (WxPayException ex) { Response.Write("<span style='color:#FF0000;font-size:20px'>" + ex.ToString() + "</span>"); } catch (Exception ex) { Response.Write("<span style='color:#FF0000;font-size:20px'>" + ex.ToString() + "</span>"); }