Просмотр исходного кода

Merge branch 'zx_saas_notify' of http://git.dayaedu.com/yonge/mec into zx_saas_goods

zouxuan 1 год назад
Родитель
Сommit
8ccb961c48

+ 3 - 3
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/PaymentParam.java

@@ -16,7 +16,7 @@ public class PaymentParam {
     
     private String payerName;
     
-//    private String notifyUrl;
+    private String notifyUrl;
     
     private String ip;
     
@@ -114,13 +114,13 @@ public class PaymentParam {
 		this.payerName = payerName;
 	}
 
-	/*public String getNotifyUrl() {
+	public String getNotifyUrl() {
 		return notifyUrl;
 	}
 
 	public void setNotifyUrl(String notifyUrl) {
 		this.notifyUrl = notifyUrl;
-	}*/
+	}
 
 	public String getIp() {
 		return ip;

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

@@ -100,24 +100,24 @@ public class OrderPayOpsServiceImpl implements OrderPayOpsService {
         
         //返回值
         Map<String, Object> payment;
-
         if (WrapperUtil.checkStr(payParam.getPlatform(), tenantPlatform)) {
             //tenant 机构开通、续费付款、 cloudTeacherOrder 团练宝激活支付、tenantRecharge 机构充值
             payment = tenantPlatformOrder(payParam);
             //主动延迟检查订单
             delayCheckTenant();
         } else {
-            
             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);
         }
@@ -167,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;
@@ -258,7 +260,7 @@ public class OrderPayOpsServiceImpl implements OrderPayOpsService {
 	        Map<String, Object> paymentParams = getPaymentParam(payParam, clazz, hfMerchantConfig.getPlatformPayeeMemberId());
 	        paymentParams.put("time_expire", timeExpire);
 	        paymentParams.put("expend", getExpend(hfMerchantConfig, payParam));
-//	        paymentParams.put("notify_url", payParam.getNotifyUrl());
+	        paymentParams.put("notify_url", payParam.getNotifyUrl());
 	        //向第三方发起支付,获取第三方的支付的信息
 	        payment = Payment.executePayment(hfMerchantConfig.getAppId(), hfMerchantConfig.getMerKey(), paymentParams);
 	        
@@ -272,7 +274,7 @@ public class OrderPayOpsServiceImpl implements OrderPayOpsService {
 			params.put("merchantNo", hfMerchantConfig.getPlatformPayeeMemberId());
 			params.put("orderId", payParam.getOrderNo());
 			params.put("orderAmount", payParam.getAmount());
-//			params.put("notifyUrl", payParam.getNotifyUrl());
+			params.put("notifyUrl", payParam.getNotifyUrl());
 			params.put("redirectUrl", payParam.getReturnUrl());
 			params.put("scene", "OFFLINE");
 			params.put("goodsName", payParam.getOrderSubject());