|
|
@ -1,38 +1,16 @@ |
|
|
|
package com.cweb.controller.pay; |
|
|
|
package com.cweb.controller.pay; |
|
|
|
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
|
|
|
|
|
import com.cweb.config.SysConst; |
|
|
|
|
|
|
|
import com.hai.common.pay.WechatPayUtil; |
|
|
|
|
|
|
|
import com.hai.common.pay.util.IOUtil; |
|
|
|
|
|
|
|
import com.hai.common.pay.util.XmlUtil; |
|
|
|
|
|
|
|
import com.hai.common.pay.util.sdk.WXPayConstants; |
|
|
|
|
|
|
|
import com.hai.common.utils.HttpsUtils; |
|
|
|
|
|
|
|
import com.hai.common.utils.ResponseMsgUtil; |
|
|
|
|
|
|
|
import com.hai.common.utils.WxUtils; |
|
|
|
|
|
|
|
import com.hai.model.ResponseData; |
|
|
|
|
|
|
|
import com.hai.model.WxSharingReceiversVO; |
|
|
|
|
|
|
|
import com.hai.service.HighProfitSharingRecordService; |
|
|
|
|
|
|
|
import com.hai.service.TelApiService; |
|
|
|
|
|
|
|
import com.hai.service.pay.NotifyService; |
|
|
|
|
|
|
|
import com.hai.service.pay.PayRecordService; |
|
|
|
|
|
|
|
import com.wechat.pay.contrib.apache.httpclient.util.PemUtil; |
|
|
|
|
|
|
|
import io.swagger.annotations.Api; |
|
|
|
import io.swagger.annotations.Api; |
|
|
|
import io.swagger.annotations.ApiOperation; |
|
|
|
import io.swagger.annotations.ApiOperation; |
|
|
|
import org.slf4j.Logger; |
|
|
|
import org.slf4j.Logger; |
|
|
|
import org.slf4j.LoggerFactory; |
|
|
|
import org.slf4j.LoggerFactory; |
|
|
|
import org.springframework.stereotype.Controller; |
|
|
|
import org.springframework.stereotype.Controller; |
|
|
|
import org.springframework.web.bind.annotation.RequestMapping; |
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
import org.springframework.web.bind.annotation.RequestMethod; |
|
|
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestParam; |
|
|
|
|
|
|
|
import org.springframework.web.bind.annotation.ResponseBody; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource; |
|
|
|
import javax.annotation.Resource; |
|
|
|
import javax.servlet.http.HttpServletRequest; |
|
|
|
import javax.servlet.http.HttpServletRequest; |
|
|
|
import javax.servlet.http.HttpServletResponse; |
|
|
|
import javax.servlet.http.HttpServletResponse; |
|
|
|
import java.io.BufferedOutputStream; |
|
|
|
import java.io.*; |
|
|
|
import java.io.FileInputStream; |
|
|
|
|
|
|
|
import java.io.FileNotFoundException; |
|
|
|
|
|
|
|
import java.io.UnsupportedEncodingException; |
|
|
|
|
|
|
|
import java.security.*; |
|
|
|
import java.security.*; |
|
|
|
import java.util.Base64; |
|
|
|
import java.util.Base64; |
|
|
|
import java.util.HashMap; |
|
|
|
import java.util.HashMap; |
|
|
@ -40,7 +18,7 @@ import java.util.Map; |
|
|
|
import java.util.SortedMap; |
|
|
|
import java.util.SortedMap; |
|
|
|
|
|
|
|
|
|
|
|
@Controller |
|
|
|
@Controller |
|
|
|
@RequestMapping(value = "/ty") |
|
|
|
@RequestMapping(value = "/tuanyou") |
|
|
|
@Api(value = "团油回调") |
|
|
|
@Api(value = "团油回调") |
|
|
|
public class TuanYouController { |
|
|
|
public class TuanYouController { |
|
|
|
|
|
|
|
|
|
|
@ -57,4 +35,25 @@ public class TuanYouController { |
|
|
|
log.error("WechatPayController --> wechatNotify() error!", e); |
|
|
|
log.error("WechatPayController --> wechatNotify() error!", e); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/orderRefundNotify", method = RequestMethod.POST) |
|
|
|
|
|
|
|
@ApiOperation(value = "订单退款回调") |
|
|
|
|
|
|
|
@ResponseBody |
|
|
|
|
|
|
|
public void orderRefundNotify(@RequestBody String reqBodyStr,HttpServletRequest request, HttpServletResponse response) { |
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
System.out.println(reqBodyStr); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
response.setCharacterEncoding("UTF-8"); |
|
|
|
|
|
|
|
response.setContentType("text/html;charset=utf-8"); |
|
|
|
|
|
|
|
PrintWriter writer= response.getWriter(); |
|
|
|
|
|
|
|
writer.write("success"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
log.error("request", request); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
|
|
|
|
log.error("WechatPayController --> wechatNotify() error!", e); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|