| | |
| | | */ |
| | | @RequestMapping({"thirdPartyRecharge.do"}) |
| | | @ResponseBody |
| | | public ServerResponse thirdPartyRecharge(@RequestParam("tradeAmoun") String tradeAmoun,HttpServletRequest request) { |
| | | public ServerResponse thirdPartyRecharge(@RequestParam("tradeAmoun") String tradeAmoun,@RequestParam("type") Integer type,HttpServletRequest request) { |
| | | payLock.lock(); |
| | | try { |
| | | if (payCreated.get()) { |
| | |
| | | if (!isIntegerGreaterThan100(tradeAmoun)) { |
| | | return ServerResponse.createByErrorMsg("请输入整数!",request); |
| | | } |
| | | if(null == type){ |
| | | return ServerResponse.createByErrorMsg("请选择支付通道!",request); |
| | | } |
| | | if(new BigDecimal(tradeAmoun).compareTo(new BigDecimal("1000")) < 0){ |
| | | return ServerResponse.createByErrorMsg("请重新输入,最低充值金额:1000", request); |
| | | } |
| | | |
| | | payCreated.set(true); |
| | | return payService.thirdPartyRecharge(request,tradeAmoun); |
| | | return payService.thirdPartyRecharge(request,tradeAmoun,type); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | return ServerResponse.createByErrorMsg("获取充值链接异常,请稍后重试", request); |
| | |
| | | } |
| | | |
| | | /** |
| | | * 充值异步接收地址 |
| | | * 充值1异步接收地址 |
| | | */ |
| | | @PostMapping({"rechargeCallback.do"}) |
| | | public void rechargeCallback(PaymentResponse vo, HttpServletResponse response) throws IOException { |
| | | payService.rechargeCallback(vo,response); |
| | | } |
| | | |
| | | /** |
| | | * 充值2异步接收地址 |
| | | */ |
| | | @PostMapping({"rechargeCallbackTwo.do"}) |
| | | public void rechargeCallbackTwo(TransactionStatusVo vo, HttpServletResponse response) throws IOException { |
| | | payService.rechargeCallbackTwo(vo,response); |
| | | } |
| | | |
| | | /** |
| | |
| | | public void noticePayment(TradeResultVO vo,HttpServletResponse response) throws IOException { |
| | | iUserWithdrawService.noticePayment(vo,response); |
| | | } |
| | | |
| | | /** |
| | | * 代付2回调通知 |
| | | */ |
| | | @PostMapping({"noticePaymentTwo.do"}) |
| | | public void noticePaymentTwo(PaymentCallbackTwo vo,HttpServletResponse response) throws IOException { |
| | | iUserWithdrawService.noticePaymentTwo(vo,response); |
| | | } |
| | | } |