|
@@ -161,6 +161,18 @@ public class PayController {
|
|
|
//reqData.put("discountAmt", ""); //参与优惠金额
|
|
|
//reqData.put("unDiscountAmt", ""); //不参与优惠金额
|
|
|
reqData.put("payType", "WECHAT"); //支付渠道
|
|
|
+ Map<String, String> stationAppIdAndAppSecret = stationService.getStationAppIdAndAppSecret(Integer.valueOf(payInfoRequest.getStationId()));
|
|
|
+ if(stationAppIdAndAppSecret !=null && stationAppIdAndAppSecret.containsKey("appId") && stationAppIdAndAppSecret.containsKey("mno")){
|
|
|
+ if(userType.equals("1")){
|
|
|
+ reqData.put("subAppid", stationAppIdAndAppSecret.get("gzhAppId")); //微信公众号
|
|
|
+ logger.info("支付子商户:"+ stationAppIdAndAppSecret.get("gzhAppId"));
|
|
|
+ }else if(userType.equals("2")){
|
|
|
+ reqData.put("subAppid", stationAppIdAndAppSecret.get("appId")); //微信小程序
|
|
|
+ logger.info("支付子商户:"+ stationAppIdAndAppSecret.get("appId"));
|
|
|
+ }
|
|
|
+ reqData.put("mno", stationAppIdAndAppSecret.get("mno")); //商户编号
|
|
|
+ logger.info("商户编号:"+ stationAppIdAndAppSecret.get("mno"));
|
|
|
+ }
|
|
|
if(userType.equals("1")){
|
|
|
//1 是公众号
|
|
|
reqData.put("payWay", "02"); //支付方式 02 公众号/服 务窗/js支付 03 小程序
|
|
@@ -183,13 +195,7 @@ public class PayController {
|
|
|
reqData.put("trmIp", "172.16.2.1");//商家ip地址
|
|
|
// reqData.put("customerIp", ""); //持卡人ip地址,银联js支付时必传
|
|
|
|
|
|
- Map<String, String> stationAppIdAndAppSecret = stationService.getStationAppIdAndAppSecret(Integer.valueOf(payInfoRequest.getStationId()));
|
|
|
- if(stationAppIdAndAppSecret !=null && stationAppIdAndAppSecret.containsKey("appId") && stationAppIdAndAppSecret.containsKey("mno")){
|
|
|
- reqData.put("subAppid", stationAppIdAndAppSecret.get("appId")); //微信子公众号
|
|
|
- reqData.put("mno", stationAppIdAndAppSecret.get("mno")); //商户编号
|
|
|
- logger.info("支付子商户:"+ stationAppIdAndAppSecret.get("appId"));
|
|
|
- logger.info("商户编号:"+ stationAppIdAndAppSecret.get("mno"));
|
|
|
- }
|
|
|
+
|
|
|
//reqData.put("outFrontUrl", ""); //js 支付,前台 成功通知地址
|
|
|
//reqData.put("outFrontFailUrl", ""); //js 支付,前台 事变通知地址
|
|
|
reqData.put("notifyUrl", "https://www.huijy.net/api/getCallback"); //回调地址
|