Browse Source

回调地址浏览器跳转

zouxuan 1 năm trước cách đây
mục cha
commit
4021a6bba8

+ 7 - 6
mec-biz/src/main/java/com/ym/mec/biz/service/impl/OrderPayOpsServiceImpl.java

@@ -100,25 +100,24 @@ public class OrderPayOpsServiceImpl implements OrderPayOpsService {
         
         //返回值
         Map<String, Object> payment;
-        String baseApiUrl = sysConfigDao.findConfigValue("base_api_url");
         if (WrapperUtil.checkStr(payParam.getPlatform(), tenantPlatform)) {
-            payParam.setNotifyUrl(baseApiUrl + "/api-web/tenantInfo/callback/" + payParam.getOrderNo());
             //tenant 机构开通、续费付款、 cloudTeacherOrder 团练宝激活支付、tenantRecharge 机构充值
             payment = tenantPlatformOrder(payParam);
             //主动延迟检查订单
             delayCheckTenant();
         } else {
-            payParam.setNotifyUrl(baseApiUrl + "/api-student/studentOrder/callback/" + payParam.getOrderNo());
             StudentPaymentOrder studentPaymentOrder = studentPaymentOrderService.findOrderByOrderNo(payParam.getOrderNo());
             if(studentPaymentOrder == null) {
-            	throw new BizException("参数错误");
+                throw new BizException("参数错误");
             }
-            
+
             payParam.setPayerName(studentPaymentOrder.getPaymentChannel());
 
             //签名验证
             checkSing(payParam);
-            
+            String baseApiUrl = sysConfigDao.findConfigValue("base_api_url");
+            payParam.setNotifyUrl(baseApiUrl + "/api-student/studentOrder/callback/" + payParam.getOrderNo());
+
             //如果以上操作都没有 则应该是这一个,因为老代码就是这样写的。
             payment = student(payParam);
         }
@@ -168,6 +167,8 @@ public class OrderPayOpsServiceImpl implements OrderPayOpsService {
 
         //签名验证
         checkSing(payParam);
+        String baseApiUrl = sysConfigDao.findConfigValue("base_api_url");
+        payParam.setNotifyUrl(baseApiUrl + "/api-web/tenantInfo/callback/" + payParam.getOrderNo());
         
         //获取支付数据
         Map<String, Object> payment;