mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-08-24 07:23:01 +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 packageValue;
|
||||||
private String noncestr;
|
private String noncestr;
|
||||||
private String timestamp;
|
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) {
|
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)
|
appResult.setAppid(appId).setPrepayId(this.prepayId).setPartnerId(mchId)
|
||||||
.setNoncestr(nonceStr).setTimestamp(timestamp)
|
.setNoncestr(nonceStr).setTimestamp(timestamp)
|
||||||
//暂填写固定值Sign=WXPay
|
//暂填写固定值Sign=WXPay
|
||||||
.setPackageValue("Sign=WXPay");
|
.setPackageValue("Sign=WXPay")
|
||||||
|
.setSign(SignUtils.sign(appResult.getSignStr(), privateKey));
|
||||||
return (T) appResult;
|
return (T) appResult;
|
||||||
case NATIVE:
|
case NATIVE:
|
||||||
return (T) this.codeUrl;
|
return (T) this.codeUrl;
|
||||||
|
Loading…
Reference in New Issue
Block a user