Java Code Examples for com.github.binarywang.wxpay.config.WxPayConfig#setSignType()
The following examples show how to use
com.github.binarywang.wxpay.config.WxPayConfig#setSignType() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: WxPayConfiguration.java From mall4j with GNU Affero General Public License v3.0 | 6 votes |
private WxPayService getWxMpPayServiceByAppId(String appid) { WxPayConfig payConfig = new WxPayConfig(); payConfig.setAppId(appid); payConfig.setMchId(wxPay.getMchId()); payConfig.setMchKey(wxPay.getMchKey()); payConfig.setKeyPath(wxPay.getKeyPath()); payConfig.setSignType(WxPayConstants.SignType.MD5); 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); // } wxPayService.setConfig(payConfig); return wxPayService; }
Example 2
Source File: WxMaConfiguration.java From charging_pile_cloud with MIT License | 6 votes |
@Bean @ConditionalOnMissingBean public WxPayService wxService() { WxPayConfig payConfig = new WxPayConfig(); payConfig.setAppId(StringUtils.trimToNull(wxPayProperties.getAppId())); payConfig.setMchId(StringUtils.trimToNull(wxPayProperties.getMchId())); payConfig.setMchKey(StringUtils.trimToNull(wxPayProperties.getMchKey())); payConfig.setSignType("MD5"); payConfig.setNotifyUrl(StringUtils.trimToNull(wxPayProperties.getNotifyUrl())); // payConfig.setKeyPath(StringUtils.trimToNull(wxPayProperties.getKeyPath())); // 可以指定是否使用沙箱环境 payConfig.setUseSandboxEnv(false); WxPayService wxPayService = new WxPayServiceImpl(); wxPayService.setConfig(payConfig); return wxPayService; }
Example 3
Source File: WxConfig.java From BigDataPlatform with GNU General Public License v3.0 | 5 votes |
@Bean public WxPayConfig wxPayConfig() { WxPayConfig payConfig = new WxPayConfig(); payConfig.setAppId(properties.getAppId()); payConfig.setMchId(properties.getMchId()); payConfig.setMchKey(properties.getMchKey()); payConfig.setNotifyUrl(properties.getNotifyUrl()); payConfig.setKeyPath(properties.getKeyPath()); payConfig.setTradeType("JSAPI"); payConfig.setSignType("MD5"); return payConfig; }
Example 4
Source File: WxConfig.java From dts-shop with GNU Lesser General Public License v3.0 | 5 votes |
@Bean public WxPayConfig wxPayConfig() { WxPayConfig payConfig = new WxPayConfig(); payConfig.setAppId(properties.getAppId()); payConfig.setMchId(properties.getMchId()); payConfig.setMchKey(properties.getMchKey()); payConfig.setNotifyUrl(properties.getNotifyUrl()); payConfig.setKeyPath(properties.getKeyPath()); payConfig.setTradeType("JSAPI"); payConfig.setSignType("MD5"); return payConfig; }
Example 5
Source File: WxConfig.java From unimall with Apache License 2.0 | 5 votes |
@Bean public WxPayConfig wxPayConfig() { WxPayConfig payConfig = new WxPayConfig(); payConfig.setMchId(properties.getMchId()); payConfig.setMchKey(properties.getMchKey()); payConfig.setNotifyUrl(properties.getNotifyUrl()); payConfig.setKeyPath(properties.getKeyPath()); payConfig.setSignType("MD5"); return payConfig; }
Example 6
Source File: WxConfig.java From mall with MIT License | 5 votes |
@Bean public WxPayConfig wxPayConfig() { WxPayConfig payConfig = new WxPayConfig(); payConfig.setAppId(properties.getAppId()); payConfig.setMchId(properties.getMchId()); payConfig.setMchKey(properties.getMchKey()); payConfig.setNotifyUrl(properties.getNotifyUrl()); payConfig.setKeyPath(properties.getKeyPath()); payConfig.setTradeType("JSAPI"); payConfig.setSignType("MD5"); return payConfig; }
Example 7
Source File: WxConfig.java From litemall with MIT License | 5 votes |
@Bean public WxPayConfig wxPayConfig() { WxPayConfig payConfig = new WxPayConfig(); payConfig.setAppId(properties.getAppId()); payConfig.setMchId(properties.getMchId()); payConfig.setMchKey(properties.getMchKey()); payConfig.setNotifyUrl(properties.getNotifyUrl()); payConfig.setKeyPath(properties.getKeyPath()); payConfig.setTradeType("JSAPI"); payConfig.setSignType("MD5"); return payConfig; }