我明明是开发者身份,由于开启了虚拟支付,手动调用道具发货接口时,总是提示无效的uri ({"errcode":40066,"errmsg":"invalid url rid: 69e64aa0-319241c8-1db3ad5d"}),然后我就到在线调试工具中去查对应的rid信息,想看到底是什么原因,但是提示我没有权限,要怎么才能看到调 用接口失败的原因呢?
我调用道具发货的代码如下:
// 通知已发货接口地址
private static final String API_Delivery_URL = "https://api.weixin.qq.com/wxa/sec/virtualpay/notify_provide_goods?access_token=";
//虚拟支付订单微信发送消息通知已发货
public static String getDeliveryResult(String orderCode,String accessToken,int env) throws IOException {
// 2. 生成时间戳、随机串
long timestamp = System.currentTimeMillis() / 1000;
String nonce = generateNonce();
// 3. 生成支付签名 paySig
com.alibaba.fastjson.JSONObject sigParams = new com.alibaba.fastjson.JSONObject();
sigParams.put("offerId", virtualOffrId);
sigParams.put("timestamp", timestamp);
sigParams.put("nonce", nonce);
sigParams.put("outTradeNo", orderCode);
String paySig = generatePaySig(env==0?virtualAppKey:virtualTestAppKey, sigParams.toString());
com.alibaba.fastjson.JSONObject body = new com.alibaba.fastjson.JSONObject();
body.put("order_id", orderCode); // 商户订单号
// body.put("wx_order_id", "这里填微信内部单号"); // 二选一
body.put("env", env);
String res = HttpUtils.sendPost(API_Delivery_URL+accessToken+"&pay_sig="+paySig, body.toString());
return res;
}
返回结果:{"errcode":40066,"errmsg":"invalid url rid: 69e64aa0-319241c8-1db3ad5d"}
在线调试工具查看rid信息截图如下:
我是开发者身份如下图:
