| @@ -58,7 +58,7 @@ public class CallbackPayController extends BaseController { | |||||
| //todo 解密回调数据 | //todo 解密回调数据 | ||||
| String decryptString = AesUtils.decryptToString(associatedData, nonce, ciphertext, payAccount.getMerchantApiv3Key()); | String decryptString = AesUtils.decryptToString(associatedData, nonce, ciphertext, payAccount.getMerchantApiv3Key()); | ||||
| logger.info("微信支付回调解密数据{}"+decryptString); | |||||
| JSONObject jsonObject = JSONObject.parseObject(decryptString); | JSONObject jsonObject = JSONObject.parseObject(decryptString); | ||||
| String out_order_no = jsonObject.getString("out_trade_no"); | String out_order_no = jsonObject.getString("out_trade_no"); | ||||
| //todo 处理支付数据 | //todo 处理支付数据 | ||||
| @@ -77,8 +77,11 @@ public class WxPayAccount extends TenantEntity { | |||||
| @io.swagger.annotations.ApiModelProperty(value="销售提点",name="sellRate") | @io.swagger.annotations.ApiModelProperty(value="销售提点",name="sellRate") | ||||
| private Integer sellRate; | private Integer sellRate; | ||||
| public String getPayNotifyV3Url() { | |||||
| return notifyUrl + "/pay/v3"; | |||||
| public String getPayNotifyV3Url(Integer projectType) { | |||||
| if(projectType == null){ | |||||
| return notifyUrl + "/pay/v3"; | |||||
| } | |||||
| return notifyUrl + "/" + projectType + "/pay/v3"; | |||||
| } | } | ||||
| public String getPayNotifyUrl() { | public String getPayNotifyUrl() { | ||||
| return notifyUrl + "/pay"; | return notifyUrl + "/pay"; | ||||
| @@ -77,7 +77,7 @@ public class WxMiniAppPaySFTAdapterService extends BaseWxPaySFTAdapterService i | |||||
| } | } | ||||
| req.setAttach(getAttach(record)); | req.setAttach(getAttach(record)); | ||||
| req.setOut_trade_no(String.valueOf(composeOrder.getMainOrderId())); | req.setOut_trade_no(String.valueOf(composeOrder.getMainOrderId())); | ||||
| req.setNotify_url(payAccount.getPayNotifyV3Url()); | |||||
| req.setNotify_url(payAccount.getPayNotifyV3Url(appInfo.getProjectType())); | |||||
| SFTPaySettleReq settle = new SFTPaySettleReq(); | SFTPaySettleReq settle = new SFTPaySettleReq(); | ||||
| settle.setProfit_sharing(true); | settle.setProfit_sharing(true); | ||||
| @@ -117,7 +117,7 @@ public class WxMiniAppPaySFTAdapterService extends BaseWxPaySFTAdapterService i | |||||
| payer.setOpenid(openId); | payer.setOpenid(openId); | ||||
| req.setCombine_payer_info(payer); | req.setCombine_payer_info(payer); | ||||
| req.setNotify_url(payAccount.getPayNotifyV3Url()); | |||||
| req.setNotify_url(payAccount.getPayNotifyV3Url(appInfo.getProjectType())); | |||||
| return req; | return req; | ||||
| } | } | ||||
| @@ -79,7 +79,7 @@ public class WxMiniAppPayV3AdapterService extends BaseWxPayV3AdapterService impl | |||||
| } | } | ||||
| req.setOut_trade_no(record.getPayOrderNo()); | req.setOut_trade_no(record.getPayOrderNo()); | ||||
| req.setAttach(getAttach(record)); | req.setAttach(getAttach(record)); | ||||
| req.setNotify_url(payAccount.getPayNotifyV3Url()); | |||||
| req.setNotify_url(payAccount.getPayNotifyV3Url(appInfo.getProjectType())); | |||||
| V3PaySettleReq settle = new V3PaySettleReq(); | V3PaySettleReq settle = new V3PaySettleReq(); | ||||
| settle.setProfit_sharing(true); | settle.setProfit_sharing(true); | ||||
| @@ -107,7 +107,7 @@ public class WxMiniAppPayV3AdapterService extends BaseWxPayV3AdapterService impl | |||||
| req.setDescription("weixin miniApp product"); | req.setDescription("weixin miniApp product"); | ||||
| } | } | ||||
| req.setOut_trade_no(productOrder.getOrderNumber()); | req.setOut_trade_no(productOrder.getOrderNumber()); | ||||
| req.setNotify_url(payAccount.getPayNotifyV3Url()); | |||||
| req.setNotify_url(payAccount.getPayNotifyV3Url(appInfo.getProjectType())); | |||||
| V3PayAmountReq amout = new V3PayAmountReq(); | V3PayAmountReq amout = new V3PayAmountReq(); | ||||
| amout.setTotal(productOrder.getOrderPrice()); | amout.setTotal(productOrder.getOrderPrice()); | ||||
| @@ -186,7 +186,7 @@ public class WxMiniAppPayV3AdapterService extends BaseWxPayV3AdapterService impl | |||||
| payer.setSub_openid(openId); | payer.setSub_openid(openId); | ||||
| req.setCombine_payer_info(payer); | req.setCombine_payer_info(payer); | ||||
| req.setNotify_url(payAccount.getPayNotifyV3Url()); | |||||
| req.setNotify_url(payAccount.getPayNotifyV3Url(appInfo.getProjectType())); | |||||
| return req; | return req; | ||||
| } | } | ||||