| @@ -124,26 +124,28 @@ public class CallbackPayController extends BaseController { | |||||
| * ----效验数据来源合法 | * ----效验数据来源合法 | ||||
| */ | */ | ||||
| try{ | try{ | ||||
| String msg = (String) paranMap.get("msg"); | |||||
| String type = (String) paranMap.get("type"); | |||||
| Map<String, Object> pMap = JSONObject.parseObject(msg, Map.class); | |||||
| // String appid = (String) pMap.get("appid"); | |||||
| // WxAppinfo appInfo = wxAppinfoService.getOnlyByAppIdFromRedis(appid); | |||||
| WxAppinfo appInfo = wxAppinfoService.getProjectCAppInfoFromRedis(projectType, EnumAppPlat.TOUTIAO.getCode()); | |||||
| WxPayAccount payAccount = wxPayAccountService.getByIdFromRedis(appInfo.getPayId()); | |||||
| if("payment".equals(type)){ | |||||
| String out_order_no = (String)pMap.get("cp_orderno"); | |||||
| EnumProductOrderPayVendor payVendorEnum = EnumProductOrderPayVendor.PAY_WAY_TT; | |||||
| ProductOrderPay orderPay = productOrderPayService.getByOrder(Long.parseLong(out_order_no), payVendorEnum); | |||||
| PayAdapterService payAdapterService = payServiceFactory.getPayAdapterService(payVendorEnum.getCode()); | |||||
| productOrderPayService.handleProductOrderByQuery(appInfo,payAccount,orderPay,payAdapterService); | |||||
| resultMap.put("err_no",0); | |||||
| resultMap.put("err_tips","success"); | |||||
| } | |||||
| // String msg = (String) paranMap.get("msg"); | |||||
| // String type = (String) paranMap.get("type"); | |||||
| // | |||||
| // Map<String, Object> pMap = JSONObject.parseObject(msg, Map.class); | |||||
| //// String appid = (String) pMap.get("appid"); | |||||
| //// WxAppinfo appInfo = wxAppinfoService.getOnlyByAppIdFromRedis(appid); | |||||
| // WxAppinfo appInfo = wxAppinfoService.getProjectCAppInfoFromRedis(projectType, EnumAppPlat.TOUTIAO.getCode()); | |||||
| // WxPayAccount payAccount = wxPayAccountService.getByIdFromRedis(appInfo.getPayId()); | |||||
| // if("payment".equals(type)){ | |||||
| // String out_order_no = (String)pMap.get("cp_orderno"); | |||||
| // | |||||
| // EnumProductOrderPayVendor payVendorEnum = EnumProductOrderPayVendor.PAY_WAY_TT; | |||||
| // ProductOrderPay orderPay = productOrderPayService.getByOrder(Long.parseLong(out_order_no), payVendorEnum); | |||||
| // | |||||
| // PayAdapterService payAdapterService = payServiceFactory.getPayAdapterService(payVendorEnum.getCode()); | |||||
| // productOrderPayService.handleProductOrderByQuery(appInfo,payAccount,orderPay,payAdapterService); | |||||
| // | |||||
| // resultMap.put("err_no",0); | |||||
| // resultMap.put("err_tips","success"); | |||||
| // } | |||||
| resultMap.put("err_no",0); | |||||
| resultMap.put("err_tips","success"); | |||||
| }catch(Exception e){ | }catch(Exception e){ | ||||
| logger.error("抖音支付回调处理异常"+e); | logger.error("抖音支付回调处理异常"+e); | ||||
| resultMap.put("err_no",ErrorCode.SYS_SERVER_ERROR.getCode()); | resultMap.put("err_no",ErrorCode.SYS_SERVER_ERROR.getCode()); | ||||