Procházet zdrojové kódy

#345 修复服务商模式下使用仅有sub_openid时无法预下单的问题.

master
Jink2005 před 7 roky
committed by Binary Wang
rodič
revize
b7443f41ae
1 změnil soubory, kde provedl 2 přidání a 2 odebrání
  1. +2
    -2
      weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/request/WxPayUnifiedOrderRequest.java

+ 2
- 2
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/request/WxPayUnifiedOrderRequest.java Zobrazit soubor

@@ -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) {


Načítá se…
Zrušit
Uložit