mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-04-05 17:38:05 +08:00
🐛 #2216 【微信支付】修复APP统一下单v3接口缺少sign参数的问题
This commit is contained in:
parent
60c9df46f5
commit
5326c5b155
@ -98,7 +98,11 @@ public class WxPayUnifiedOrderV3Result implements Serializable {
|
||||
private String packageValue;
|
||||
private String noncestr;
|
||||
private String timestamp;
|
||||
private String sign;
|
||||
|
||||
private String getSignStr() {
|
||||
return String.format("%s\n%s\n%s\n%s\n", appid, timestamp, noncestr, prepayid);
|
||||
}
|
||||
}
|
||||
|
||||
public <T> T getPayInfo(TradeTypeEnum tradeType, String appId, String mchId, PrivateKey privateKey) {
|
||||
@ -119,7 +123,8 @@ public class WxPayUnifiedOrderV3Result implements Serializable {
|
||||
appResult.setAppid(appId).setPrepayId(this.prepayId).setPartnerId(mchId)
|
||||
.setNoncestr(nonceStr).setTimestamp(timestamp)
|
||||
//暂填写固定值Sign=WXPay
|
||||
.setPackageValue("Sign=WXPay");
|
||||
.setPackageValue("Sign=WXPay")
|
||||
.setSign(SignUtils.sign(appResult.getSignStr(), privateKey));
|
||||
return (T) appResult;
|
||||
case NATIVE:
|
||||
return (T) this.codeUrl;
|
||||
|
Loading…
Reference in New Issue
Block a user