Skip to content

Commit

Permalink
#345 修复服务商模式下使用仅有sub_openid时无法预下单的问题.
Browse files Browse the repository at this point in the history
  • Loading branch information
jink2005 authored and binarywang committed Sep 22, 2017
1 parent 7bb3a12 commit b7443f4
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -339,8 +339,8 @@ protected void checkConstraints() throws WxPayException {
// 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) {
Expand Down

0 comments on commit b7443f4

Please sign in to comment.