收藏
回答

微信的退款接口没有任何返回数据?

调用的是SDK的方法,Map<String, String> data = new HashMap<String, String>();
//out_refund_no
data.put("out_trade_no", orderNo);
//微信退款单位是分,1分钱 "1"
BigDecimal multiply = amount.multiply(new BigDecimal(100));
logger.info("weChatRefundOrder:multiply-->" + multiply);
data.put("refund_fee", multiply.toBigInteger().toString());
BigDecimal totalBigDecimal = omsOrderDetail.getPayAmount().multiply(new BigDecimal(100));
logger.info("weChatRefundOrder:totalBigDecimal-->" + totalBigDecimal);
data.put("total_fee", totalBigDecimal.toBigInteger().toString());
logger.info("weChatRefundOrder:total_fee-->" + totalBigDecimal.toBigInteger().toString());
data.put("fee_type", "CNY");
//退款单号,用于多次退款
data.put("out_refund_no", outRefundNo);
logger.info("weChatRefundOrder:resp-->");
logger.info("weChatRefundOrder:wxpay-->" + wxpay);
Map<String, String> resp = wxpay.refund(data);
logger.info("weChatRefundOrder:resp-->" + resp);
String result = JSON.toJSONString(resp, SerializerFeature.WriteMapNullValue);
logger.info("weChatRefundOrder:result-->" + result);


回答关注问题邀请回答
收藏

2 个回答

  • 困了不想睡
    困了不想睡
    09-09

    确定请求通了吗?

    09-09
    有用
    回复
  • ㅤㅤㅤㅤ
    ㅤㅤㅤㅤ
    2021-07-20

    你是指 `result` 打印出来是空?

    2021-07-20
    有用
    回复
登录 后发表内容