| | |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 惠民卡回调 |
| | | * 玩湃惠民卡回调 |
| | | * @author zhibing.pu |
| | | * @date 2023/6/24 11:27 |
| | | */ |
| | |
| | | |
| | | |
| | | /** |
| | | * 惠民卡支付宝支付回调接口 |
| | | * 玩湃惠民卡支付宝支付回调接口 |
| | | */ |
| | | @PostMapping("/aliPayHuiminCallback") |
| | | public void aliPayHuiminCallback(HttpServletRequest request, HttpServletResponse response) { |
| | | try { |
| | | System.err.println("==========回调"); |
| | | System.err.println("支付宝回调"); |
| | | Map<String, String> map = payMoneyUtil.alipayCallback(request); |
| | | if (null != map) { |
| | | String out_trade_no = map.get("out_trade_no"); |
| | |
| | | out.write("success"); |
| | | out.flush(); |
| | | out.close(); |
| | | }else{ |
| | | }else if (one.getStatus()==1){ |
| | | one.setOrderNumber(transaction_id); |
| | | one.setStatus(2); |
| | | one.setPaymentTime(new Date()); |
| | | payHuiminService.updateById(one); |
| | | PrintWriter out = response.getWriter(); |
| | | out.write("success"); |
| | | out.flush(); |
| | | out.close(); |
| | | }else{ |
| | | PrintWriter out = response.getWriter(); |
| | | out.write("success"); |
| | | out.flush(); |
| | | out.close(); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | } |
| | | /** |
| | | * 惠民卡微信支付回调接口 |
| | | * 玩湃惠民卡微信支付回调接口 |
| | | */ |
| | | @PostMapping("/weixinPayHuiminCallback") |
| | | public void weixinPayHuiminCallback(HttpServletRequest request, HttpServletResponse response) { |
| | | try { |
| | | System.err.println("微信回调"); |
| | | Map<String, String> map = payMoneyUtil.weixinpayCallback(request); |
| | | if (null != map) { |
| | | String out_trade_no = map.get("out_trade_no"); |
| | |
| | | out.write(result); |
| | | out.flush(); |
| | | out.close(); |
| | | }else{ |
| | | }else if (one.getStatus()==1){ |
| | | one.setOrderNumber(transaction_id); |
| | | one.setStatus(2); |
| | | one.setPaymentTime(new Date()); |
| | | payHuiminService.updateById(one); |
| | | PrintWriter out = response.getWriter(); |
| | | out.write(result); |
| | | out.flush(); |
| | | out.close(); |
| | | }else{ |
| | | PrintWriter out = response.getWriter(); |
| | | out.write(result); |
| | | out.flush(); |
| | | out.close(); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | } |
| | | /** |
| | | * 惠民卡微信退款回调 |
| | | * 玩湃惠民卡微信退款回调 |
| | | * @param request |
| | | * @param response |
| | | */ |