|  |  |  | 
|---|
|  |  |  | package com.doumee.api.business; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.alibaba.fastjson.JSON; | 
|---|
|  |  |  | import com.alibaba.fastjson.JSONObject; | 
|---|
|  |  |  | import com.doumee.config.wx.TransferDetailEntityNew; | 
|---|
|  |  |  | import com.doumee.config.wx.WxMiniConfig; | 
|---|
|  |  |  | import com.doumee.core.constants.Constants; | 
|---|
|  |  |  | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @PostMapping("/web/wxPayNotify") | 
|---|
|  |  |  | public ApiResponse wxPay_notify(HttpServletRequest request) { | 
|---|
|  |  |  | log.error("微信支付回调结果开始===========" ); | 
|---|
|  |  |  | try { | 
|---|
|  |  |  | ServletInputStream inputStream = request.getInputStream(); | 
|---|
|  |  |  | StringBuffer stringBuffer = new StringBuffer(); | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | Transaction result = parser.parse(requestParam, Transaction.class); | 
|---|
|  |  |  | log.error("支付回调信息:{}"+ JSONObject.toJSONString(result)); | 
|---|
|  |  |  | //自定义订单号 | 
|---|
|  |  |  | String outTradeNo = result.getOutTradeNo(); | 
|---|
|  |  |  | //微信订单号 | 
|---|
|  |  |  | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | // 支付失败 | 
|---|
|  |  |  | switch (result.getAttach()) { | 
|---|
|  |  |  | case "createGoodsOrder": { | 
|---|
|  |  |  | case "createOrder": { | 
|---|
|  |  |  | break; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | log.error("微信支付回调结果结束===========" ); | 
|---|
|  |  |  | return ApiResponse.success("处理成功!"); | 
|---|
|  |  |  | } catch (Exception e) { | 
|---|
|  |  |  | e.printStackTrace(); | 
|---|