|
|
@ -607,8 +607,10 @@ public class WeixinServiceImpl implements WeixinService {
|
|
|
|
getApiConfig(storeId, platform);
|
|
|
|
getApiConfig(storeId, platform);
|
|
|
|
WxPayApiConfig wxPayApiConfig = WxPayApiConfigKit.getWxPayApiConfig();
|
|
|
|
WxPayApiConfig wxPayApiConfig = WxPayApiConfigKit.getWxPayApiConfig();
|
|
|
|
Map<String, String> params = RefundModel.builder()
|
|
|
|
Map<String, String> params = RefundModel.builder()
|
|
|
|
.appid(wxPayApiConfig.getAppId())
|
|
|
|
.sub_appid(wxPayApiConfig.getAppId())
|
|
|
|
.mch_id(wxPayApiConfig.getMchId())
|
|
|
|
.sub_mch_id(wxPayApiConfig.getMchId())
|
|
|
|
|
|
|
|
.appid(wxPayApiConfig.getSlAppId())
|
|
|
|
|
|
|
|
.mch_id(wxPayApiConfig.getSlMchId())
|
|
|
|
.nonce_str(WxPayKit.generateStr())
|
|
|
|
.nonce_str(WxPayKit.generateStr())
|
|
|
|
.transaction_id("")
|
|
|
|
.transaction_id("")
|
|
|
|
.out_trade_no(orderSn)
|
|
|
|
.out_trade_no(orderSn)
|
|
|
@ -924,8 +926,10 @@ public class WeixinServiceImpl implements WeixinService {
|
|
|
|
getApiConfig(storeId, platform);
|
|
|
|
getApiConfig(storeId, platform);
|
|
|
|
WxPayApiConfig wxPayApiConfig = WxPayApiConfigKit.getWxPayApiConfig();
|
|
|
|
WxPayApiConfig wxPayApiConfig = WxPayApiConfigKit.getWxPayApiConfig();
|
|
|
|
Map<String, String> params = MicroPayModel.builder()
|
|
|
|
Map<String, String> params = MicroPayModel.builder()
|
|
|
|
.appid(wxPayApiConfig.getAppId())
|
|
|
|
.sub_appid(wxPayApiConfig.getAppId())
|
|
|
|
.mch_id(wxPayApiConfig.getMchId())
|
|
|
|
.sub_mch_id(wxPayApiConfig.getMchId())
|
|
|
|
|
|
|
|
.appid(wxPayApiConfig.getSlAppId())
|
|
|
|
|
|
|
|
.mch_id(wxPayApiConfig.getSlMchId())
|
|
|
|
.nonce_str(WxPayKit.generateStr())
|
|
|
|
.nonce_str(WxPayKit.generateStr())
|
|
|
|
.body(reqData.get("body"))
|
|
|
|
.body(reqData.get("body"))
|
|
|
|
.attach(reqData.get("body"))
|
|
|
|
.attach(reqData.get("body"))
|
|
|
@ -1007,8 +1011,11 @@ public class WeixinServiceImpl implements WeixinService {
|
|
|
|
WxPayApiConfig wxPayApiConfig = WxPayApiConfigKit.getWxPayApiConfig();
|
|
|
|
WxPayApiConfig wxPayApiConfig = WxPayApiConfigKit.getWxPayApiConfig();
|
|
|
|
Map<String, String> params = UnifiedOrderModel
|
|
|
|
Map<String, String> params = UnifiedOrderModel
|
|
|
|
.builder()
|
|
|
|
.builder()
|
|
|
|
.appid(wxPayApiConfig.getAppId())
|
|
|
|
.sub_appid(wxPayApiConfig.getAppId())
|
|
|
|
.mch_id(wxPayApiConfig.getMchId())
|
|
|
|
.sub_mch_id(wxPayApiConfig.getMchId())
|
|
|
|
|
|
|
|
.sub_openid(reqData.get("openid"))
|
|
|
|
|
|
|
|
.appid(wxPayApiConfig.getSlAppId())
|
|
|
|
|
|
|
|
.mch_id(wxPayApiConfig.getSlMchId())
|
|
|
|
.nonce_str(WxPayKit.generateStr())
|
|
|
|
.nonce_str(WxPayKit.generateStr())
|
|
|
|
.body(reqData.get("body"))
|
|
|
|
.body(reqData.get("body"))
|
|
|
|
.attach(reqData.get("body"))
|
|
|
|
.attach(reqData.get("body"))
|
|
|
@ -1017,7 +1024,6 @@ public class WeixinServiceImpl implements WeixinService {
|
|
|
|
.spbill_create_ip(ip)
|
|
|
|
.spbill_create_ip(ip)
|
|
|
|
.notify_url(wxPayApiConfig.getDomain() + CALL_BACK_URL)
|
|
|
|
.notify_url(wxPayApiConfig.getDomain() + CALL_BACK_URL)
|
|
|
|
.trade_type(reqData.get("trade_type"))
|
|
|
|
.trade_type(reqData.get("trade_type"))
|
|
|
|
.openid(reqData.get("openid"))
|
|
|
|
|
|
|
|
.build()
|
|
|
|
.build()
|
|
|
|
.createSign(wxPayApiConfig.getPartnerKey(), SignType.MD5);
|
|
|
|
.createSign(wxPayApiConfig.getPartnerKey(), SignType.MD5);
|
|
|
|
String xmlResult = WxPayApi.pushOrder(false, params);
|
|
|
|
String xmlResult = WxPayApi.pushOrder(false, params);
|
|
|
@ -1067,8 +1073,11 @@ public class WeixinServiceImpl implements WeixinService {
|
|
|
|
sceneInfo.setH5Info(h5Info);
|
|
|
|
sceneInfo.setH5Info(h5Info);
|
|
|
|
Map<String, String> params = UnifiedOrderModel
|
|
|
|
Map<String, String> params = UnifiedOrderModel
|
|
|
|
.builder()
|
|
|
|
.builder()
|
|
|
|
.appid(wxPayApiConfig.getAppId())
|
|
|
|
.sub_appid(wxPayApiConfig.getAppId())
|
|
|
|
.mch_id(wxPayApiConfig.getMchId())
|
|
|
|
.sub_mch_id(wxPayApiConfig.getMchId())
|
|
|
|
|
|
|
|
.sub_openid(reqData.get("openid"))
|
|
|
|
|
|
|
|
.appid(wxPayApiConfig.getSlAppId())
|
|
|
|
|
|
|
|
.mch_id(wxPayApiConfig.getSlMchId())
|
|
|
|
.nonce_str(WxPayKit.generateStr())
|
|
|
|
.nonce_str(WxPayKit.generateStr())
|
|
|
|
.body(reqData.get("body"))
|
|
|
|
.body(reqData.get("body"))
|
|
|
|
.attach(reqData.get("body"))
|
|
|
|
.attach(reqData.get("body"))
|
|
|
@ -1119,6 +1128,8 @@ public class WeixinServiceImpl implements WeixinService {
|
|
|
|
String apiV2 = wxPayBean.getApiV2();
|
|
|
|
String apiV2 = wxPayBean.getApiV2();
|
|
|
|
String certPath = wxPayBean.getCertPath();
|
|
|
|
String certPath = wxPayBean.getCertPath();
|
|
|
|
String appId = wxPayBean.getAppId();
|
|
|
|
String appId = wxPayBean.getAppId();
|
|
|
|
|
|
|
|
String slAppId = wxPayBean.getSlAppId();
|
|
|
|
|
|
|
|
String slMchId = wxPayBean.getSlMchId();
|
|
|
|
logger.info("微信支付店铺信息:{}", JsonUtil.toJSONString(mtStore));
|
|
|
|
logger.info("微信支付店铺信息:{}", JsonUtil.toJSONString(mtStore));
|
|
|
|
if (mtStore != null && StringUtil.isNotEmpty(mtStore.getWxApiV2()) && StringUtil.isNotEmpty(mtStore.getWxMchId())) {
|
|
|
|
if (mtStore != null && StringUtil.isNotEmpty(mtStore.getWxApiV2()) && StringUtil.isNotEmpty(mtStore.getWxMchId())) {
|
|
|
|
mchId = mtStore.getWxMchId();
|
|
|
|
mchId = mtStore.getWxMchId();
|
|
|
@ -1131,6 +1142,8 @@ public class WeixinServiceImpl implements WeixinService {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
apiConfig = WxPayApiConfig.builder()
|
|
|
|
apiConfig = WxPayApiConfig.builder()
|
|
|
|
|
|
|
|
.slAppId(slAppId)
|
|
|
|
|
|
|
|
.slMchId(slMchId)
|
|
|
|
.appId(appId)
|
|
|
|
.appId(appId)
|
|
|
|
.mchId(mchId)
|
|
|
|
.mchId(mchId)
|
|
|
|
.partnerKey(apiV2)
|
|
|
|
.partnerKey(apiV2)
|
|
|
|