| | |
| | | |
| | | @Autowired |
| | | private IReassignService reassignService; |
| | | |
| | | @Autowired |
| | | private ICBCPayUtil icbcPayUtil; |
| | | |
| | |
| | | try { |
| | | Map<String, String> map = payMoneyUtil.weixinpayCallback(request); |
| | | if(null != map){ |
| | | String id = map.get("out_trade_no"); |
| | | String order_id = map.get("transaction_id"); |
| | | String out_trade_no = map.get("out_trade_no"); |
| | | String transaction_id = map.get("transaction_id"); |
| | | |
| | | String substring = out_trade_no.substring(17); |
| | | Integer type = Integer.valueOf(substring.substring(0, 1)); |
| | | Integer id = Integer.valueOf(substring.substring(1)); |
| | | reassignService.payReassign(id.toString(), type, transaction_id, 1); |
| | | |
| | | String result = map.get("result"); |
| | | if(ToolUtil.isNotEmpty(id) && ToolUtil.isNotEmpty(order_id)){ |
| | | PrintWriter out = response.getWriter(); |
| | | out.write(result); |
| | | out.flush(); |
| | | out.close(); |
| | | reassignService.payReassign(id, order_id, 1); |
| | | } |
| | | PrintWriter out = response.getWriter(); |
| | | out.print(result); |
| | | out.flush(); |
| | | out.close(); |
| | | } |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | |
| | | try { |
| | | Map<String, String> map = payMoneyUtil.alipayCallback(request); |
| | | if(null != map){ |
| | | String id = map.get("out_trade_no"); |
| | | String order_id = map.get("trade_no"); |
| | | if(ToolUtil.isNotEmpty(id) && ToolUtil.isNotEmpty(order_id)){ |
| | | reassignService.payReassign(id, order_id, 2); |
| | | } |
| | | String out_trade_no = map.get("out_trade_no"); |
| | | String trade_no = map.get("trade_no"); |
| | | |
| | | String substring = out_trade_no.substring(17); |
| | | Integer type = Integer.valueOf(substring.substring(0, 1)); |
| | | Integer id = Integer.valueOf(substring.substring(1)); |
| | | reassignService.payReassign(id.toString(), type, trade_no, 2); |
| | | PrintWriter out = response.getWriter(); |
| | | out.print("success"); |
| | | out.flush(); |
| | | out.close(); |
| | | } |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |