-
-
Notifications
You must be signed in to change notification settings - Fork 495
Open
Description
How do I get a payment code to pay a signature in WxPayMicropayRequest?
Version 4.8.0
String nonceStr = IdUtil.fastSimpleUUID();
WxPayMicropayRequest request = new WxPayMicropayRequest();
request.setAppid(wxPayService.getConfig().getAppId());
request.setMchId(wxPayService.getConfig().getMchId());
request.setNonceStr(nonceStr);
request.setBody(body);
request.setOutTradeNo(outTradeNo);
request.setTotalFee(totalFee);
request.setSpbillCreateIp(ip);
request.setAuthCode(authCode);
HashMap<String,String> map = new HashMap<>();
map.put("appid",wxPayService.getConfig().getAppId());
map.put("mch_id",wxPayService.getConfig().getMchId());
map.put("nonce_str",nonceStr);
map.put("body",body);
map.put("out_trade_no",outTradeNo);
map.put("total_fee",totalFee.toString());
map.put("spbill_create_ip",ip);
map.put("auth_code",authCode);
String[] ignoredParams = new String[]{};
String sign = SignUtils.createSign(map, "", apiV2Key, ignoredParams);
request.setSign(sign);
WxPayMicropayResult micropayResult = wxPayService.micropay(request);
----报错-----
返回代码:[FAIL],返回信息:[签名错误,请检查后再试],微信返回的原始报文:
<return_code></return_code>
<return_msg></return_msg>
@binarywang 签名部分能给个例子吗?谢谢🙏
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels