| | |
| | | public void wxCancelUserBalance(HttpServletRequest request, HttpServletResponse response){ |
| | | try { |
| | | Map<String, String> map = payMoneyUtil.weixinpayCallback(request); |
| | | String id = map.get("out_trade_no"); |
| | | String order_id = map.get("transaction_id"); |
| | | String uid = map.get("attach"); |
| | | String result = map.get("result"); |
| | | userInfoService.payCancelUserBalance(Integer.valueOf(uid), order_id, Integer.valueOf(id), 1); |
| | | PrintWriter out = response.getWriter(); |
| | | out.write(result); |
| | | out.flush(); |
| | | out.close(); |
| | | if(null != map){ |
| | | String out_trade_no = map.get("out_trade_no"); |
| | | String transaction_id = map.get("transaction_id"); |
| | | String uid = map.get("attach"); |
| | | |
| | | String id = out_trade_no.substring(17); |
| | | userInfoService.payCancelUserBalance(Integer.valueOf(uid), transaction_id, Integer.valueOf(id), 1); |
| | | |
| | | String result = map.get("result"); |
| | | PrintWriter out = response.getWriter(); |
| | | out.print(result); |
| | | out.flush(); |
| | | out.close(); |
| | | } |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | } |
| | |
| | | public void aliCancelUserBalance(HttpServletRequest request, HttpServletResponse response){ |
| | | try { |
| | | Map<String, String> map = payMoneyUtil.alipayCallback(request); |
| | | String id = map.get("out_trade_no"); |
| | | String order_id = map.get("trade_no"); |
| | | String uid = map.get("passback_params"); |
| | | userInfoService.payCancelUserBalance(Integer.valueOf(uid), order_id, Integer.valueOf(id), 2); |
| | | if(null != map){ |
| | | String out_trade_no = map.get("out_trade_no"); |
| | | String trade_no = map.get("trade_no"); |
| | | String uid = map.get("subject"); |
| | | |
| | | String id = out_trade_no.substring(17); |
| | | userInfoService.payCancelUserBalance(Integer.valueOf(uid), trade_no, Integer.valueOf(id), 2); |
| | | PrintWriter out = response.getWriter(); |
| | | out.print("success"); |
| | | out.flush(); |
| | | out.close(); |
| | | } |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | } |