修改多appid

This commit is contained in:
韩鹏辉 2023-09-06 10:24:45 +08:00
parent 36df177985
commit 994b2c182b
4 changed files with 18 additions and 5 deletions

View File

@ -58,10 +58,8 @@ public class LkLPayServiceImpl implements PayService {
account_type = "wechatPay".equals(order.getPayTypeCode()) ? "WECHAT" : "aliPay".equals(order.getPayTypeCode()) ? "ALIPAY" : "UQRCODEPAY";
}
String transType = account_type.equals("WECHAT") ? "71" : account_type.equals("ALIPAY") ? "41" : "51";
QueryWrapper<MerchantBackLkl> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("merchant_code", merchant.getMerchantCode());
queryWrapper.eq("channel", "5");
@ -76,6 +74,12 @@ public class LkLPayServiceImpl implements PayService {
Long order_amt = changeY2F(order.getConsumeFee());
String body = null;
if (account_type.equals("WECHAT")) {
if(ObjectUtil.isEmpty(order.getAppletsAppid())){
order.setAppletsAppid(ParametersUtil.APPLETS_APPID);
}
body="{\n" +
"\t\"out_org_code\": \""+lakalaConfig.getAppid()+"\",\n" +
"\t\"req_data\": {\n" +

View File

@ -76,7 +76,12 @@ public class RyxPayServiceimpl implements RyxPayService {
if("wechatPay".equals(order.getPayTypeCode())){
barCode = RyxConfig.barCodePayApplets;
reqData.put("userId",order.getMercUserId());
reqData.put("subAppId",ParametersUtil.APPLETS_APPID);
if(ObjectUtil.isNotEmpty(order.getAppletsAppid())){
reqData.put("subAppId",order.getAppletsAppid());
}else {
reqData.put("subAppId",ParametersUtil.APPLETS_APPID);
}
}else if("aliPay".equals(order.getPayTypeCode())){
payWay = "ZFBZF";
reqData.put("buyerId",order.getMercUserId());

View File

@ -511,7 +511,7 @@ public class SxfPayServiceImpl implements SxfPayService {
if (("9".equals(order.getOrderType()) || "3".equals(order.getOrderType()) || "10".equals(order.getOrderType())) &&
"WECHAT".equals(reqData.getString("payType"))) {
String defaultSupAppId = order.getAppletsAppid();
if (StringUtil.isNotEmpty(merchant.getSubAppId())) {
if (ObjectUtil.isEmpty(defaultSupAppId)) {
defaultSupAppId = merchant.getSubAppId();
}
reqData.put("subAppid", defaultSupAppId);

View File

@ -168,7 +168,11 @@ public class YsPayOldServiceImpl extends YsPayServiceImpl{
String bank_type = Constant.PAY_TYPE_WECHAT.equals(order.getPayTypeCode()) ? "1902000" : Constant.PAY_TYPE_ALIPAY.equals(order.getPayTypeCode()) ? "1903000" : "9001002";
reqData.put("bank_type",bank_type);
}else{
reqData.put("sub_openid", ParametersUtil.APPID);
if(ObjectUtil.isNotEmpty(order.getAppletsAppid())){
reqData.put("subAppId",order.getAppletsAppid());
}else {
reqData.put("subAppId",ParametersUtil.APPLETS_APPID);
}
if(Constant.PAY_TYPE_WECHAT.equals(order.getPayTypeCode())){
ysEnum = YsEnum.WECHART_JS_PAY;
// 会员充值主扫小程序 小程序当面付 10 小程序线上店