mirror of
https://gitee.com/gz-yami/mall4j.git
synced 2026-03-22 09:17:16 +08:00
注掉沙箱的代码,防止没有配置微信支付信息时,启动报错
This commit is contained in:
@@ -68,18 +68,18 @@ public class WxPayConfiguration {
|
||||
|
||||
WxPayService wxPayService = new WxPayServiceImpl();
|
||||
|
||||
|
||||
if (Objects.equals(profile, "dev")) {
|
||||
String sandboxSignKey = null;
|
||||
try {
|
||||
wxPayService.setConfig(payConfig);
|
||||
sandboxSignKey = wxPayService.getSandboxSignKey();
|
||||
} catch (WxPayException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
payConfig.setUseSandboxEnv(true);
|
||||
payConfig.setMchKey(sandboxSignKey);
|
||||
}
|
||||
// 打开下面的代码,开启沙箱模式
|
||||
// if (Objects.equals(profile, "dev")) {
|
||||
// String sandboxSignKey = null;
|
||||
// try {
|
||||
// wxPayService.setConfig(payConfig);
|
||||
// sandboxSignKey = wxPayService.getSandboxSignKey();
|
||||
// } catch (WxPayException e) {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
// payConfig.setUseSandboxEnv(true);
|
||||
// payConfig.setMchKey(sandboxSignKey);
|
||||
// }
|
||||
|
||||
wxPayService.setConfig(payConfig);
|
||||
return wxPayService;
|
||||
|
||||
Reference in New Issue
Block a user