| | |
| | | if(null == type){ |
| | | return ServerResponse.createByErrorMsg("请选择支付通道!",request); |
| | | } |
| | | if(new BigDecimal(tradeAmoun).compareTo(new BigDecimal("1000")) < 0){ |
| | | return ServerResponse.createByErrorMsg("请重新输入,最低充值金额:1000", request); |
| | | if(new BigDecimal(tradeAmoun).compareTo(new BigDecimal("5000")) < 0){ |
| | | return ServerResponse.createByErrorMsg("请重新输入,最低充值金额:5000", request); |
| | | } |
| | | if(type == 0 && new BigDecimal(tradeAmoun).compareTo(new BigDecimal("40000")) > 0){ |
| | | return ServerResponse.createByErrorMsg("请重新输入,最大充值金额:40000", request); |
| | | } |
| | | |
| | | payCreated.set(true); |
| | |
| | | } |
| | | |
| | | /** |
| | | * 默认充值异步接收地址 |
| | | */ |
| | | @PostMapping({"rechargeCallbackZero.do"}) |
| | | public void rechargeCallbackZero(@RequestBody PaymentNotifyResponse vo, HttpServletResponse response) throws IOException { |
| | | payService.rechargeCallbackZero(vo,response); |
| | | } |
| | | |
| | | /** |
| | | * 充值1异步接收地址 |
| | | */ |
| | | @PostMapping({"rechargeCallback.do"}) |
| | |
| | | * 充值2异步接收地址 |
| | | */ |
| | | @PostMapping({"rechargeCallbackTwo.do"}) |
| | | public void rechargeCallbackTwo(TransactionStatusVo vo, HttpServletResponse response) throws IOException { |
| | | public void rechargeCallbackTwo(@RequestParam("status") String status, |
| | | @RequestParam("merchantid") String merchantid, |
| | | @RequestParam("out_trade_no") String outTradeNo, |
| | | @RequestParam("total_fee") String totalFee, |
| | | @RequestParam("poundage") String poundage, |
| | | @RequestParam("account_fee") String accountFee, |
| | | @RequestParam("sign") String sign, HttpServletResponse response) throws IOException { |
| | | TransactionStatusVo vo = new TransactionStatusVo(); |
| | | vo.setStatus(status); |
| | | vo.setMerchantid(merchantid); |
| | | vo.setOut_trade_no(outTradeNo); |
| | | vo.setTotal_fee(totalFee); |
| | | vo.setPoundage(poundage); |
| | | vo.setAccount_fee(accountFee); |
| | | vo.setSign(sign); |
| | | payService.rechargeCallbackTwo(vo,response); |
| | | } |
| | | |
| | | /** |
| | | * 代付回调通知 |
| | | * 充值2异步接收地址 |
| | | */ |
| | | @PostMapping({"noticePayment.do"}) |
| | | public void noticePayment(TradeResultVO vo,HttpServletResponse response) throws IOException { |
| | | iUserWithdrawService.noticePayment(vo,response); |
| | | @PostMapping({"rechargeCallbackThree.do"}) |
| | | public void rechargeCallbackThree(@RequestBody RechargeCallbackThreeVo callbackVo, HttpServletResponse response) throws IOException { |
| | | TransactionStatusVo vo = new TransactionStatusVo(); |
| | | vo.setStatus(callbackVo.getOrder_status()); |
| | | vo.setMerchantid(callbackVo.getMerchant_id()); |
| | | vo.setOut_trade_no(callbackVo.getSystem_order_id()); |
| | | vo.setTotal_fee(callbackVo.getAmount()); |
| | | vo.setAccount_fee(callbackVo.getAccount_amount()); |
| | | vo.setSign(callbackVo.getSign()); |
| | | vo.setPoundage("0"); |
| | | payService.rechargeCallbackThree(vo,response); |
| | | } |
| | | |
| | | /** |
| | | * 代付2回调通知 |
| | | * 代付回调接口 |
| | | */ |
| | | @PostMapping({"noticePaymentTwo.do"}) |
| | | public void noticePaymentTwo(PaymentCallbackTwo vo,HttpServletResponse response) throws IOException { |
| | | iUserWithdrawService.noticePaymentTwo(vo,response); |
| | | @PostMapping({"payoutCallback.do"}) |
| | | public void payoutCallback(@RequestBody PayoutCallbackVo callbackVo, HttpServletResponse response) throws IOException { |
| | | payService.payoutCallback(callbackVo, response); |
| | | } |
| | | } |