We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7bb3a12 commit b7443f4Copy full SHA for b7443f4
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/request/WxPayUnifiedOrderRequest.java
@@ -339,8 +339,8 @@ protected void checkConstraints() throws WxPayException {
339
// Arrays.toString(TRADE_TYPES), this.getTradeType()));
340
// }
341
342
- if ("JSAPI".equals(this.getTradeType()) && this.getOpenid() == null) {
343
- throw new WxPayException("当 trade_type是'JSAPI'时未指定openid");
+ if ("JSAPI".equals(this.getTradeType()) && this.getOpenid() == null && this.getSubOpenid() == null) {
+ throw new WxPayException("当 trade_type是'JSAPI'时未指定openid或sub_openid");
344
}
345
346
if ("NATIVE".equals(this.getTradeType()) && this.getProductId() == null) {
0 commit comments