|
|
@@ -104,10 +104,15 @@ public class NewPayServiceImpl implements NewPayService {
|
|
|
WechatTransactionsParamVO wechatPayParamVO;
|
|
|
try {
|
|
|
QrcodeOpenPayResponseBean response = qrcodePay.openPay(openRequest);
|
|
|
- JSONObject barCodeJson = JSONUtil.parseObj(response.getBarCode());
|
|
|
+ String barCode = response.getBarCode();
|
|
|
+ if (StrUtil.isBlank(barCode)) {
|
|
|
+ throw new SqxException(response.getMessage());
|
|
|
+ }
|
|
|
+ JSONObject barCodeJson = JSONUtil.parseObj(barCode);
|
|
|
wechatPayParamVO = barCodeJson.toBean(WechatTransactionsParamVO.class);
|
|
|
wechatPayParamVO.setPackageStr(barCodeJson.getStr("package"));
|
|
|
} catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
throw new SqxException("获取支付参数失败:" + e.getMessage());
|
|
|
}
|
|
|
|