From b7443f41ae9d11dfe3633b3228fce8c3cc908d06 Mon Sep 17 00:00:00 2001 From: Jink2005 Date: Fri, 22 Sep 2017 11:04:05 +0800 Subject: [PATCH] =?UTF-8?q?#345=20=E4=BF=AE=E5=A4=8D=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E5=95=86=E6=A8=A1=E5=BC=8F=E4=B8=8B=E4=BD=BF=E7=94=A8=E4=BB=85?= =?UTF-8?q?=E6=9C=89sub=5Fopenid=E6=97=B6=E6=97=A0=E6=B3=95=E9=A2=84?= =?UTF-8?q?=E4=B8=8B=E5=8D=95=E7=9A=84=E9=97=AE=E9=A2=98.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wxpay/bean/request/WxPayUnifiedOrderRequest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/request/WxPayUnifiedOrderRequest.java b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/request/WxPayUnifiedOrderRequest.java index e3c418f35..edfe3f527 100644 --- a/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/request/WxPayUnifiedOrderRequest.java +++ b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/request/WxPayUnifiedOrderRequest.java @@ -339,8 +339,8 @@ public class WxPayUnifiedOrderRequest extends WxPayBaseRequest { // Arrays.toString(TRADE_TYPES), this.getTradeType())); // } - if ("JSAPI".equals(this.getTradeType()) && this.getOpenid() == null) { - 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"); } if ("NATIVE".equals(this.getTradeType()) && this.getProductId() == null) {