| | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.PrintWriter; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | |
| | | |
| | | |
| | | @RestController |
| | | @RequestMapping("/payment/callback") |
| | | @RequestMapping("") |
| | | public class PaymentCallbackController { |
| | | |
| | | |
| | |
| | | String out_trade_no = map.get("out_trade_no"); |
| | | String transaction_id = map.get("transaction_id"); |
| | | String result = map.get("result"); |
| | | ResultUtil resultUtil = tappService.exchangeAddPaymentCallback(out_trade_no, transaction_id, 1); |
| | | ResultUtil resultUtil = tappService.exchangeAddPaymentCallback(out_trade_no, transaction_id); |
| | | if (resultUtil.getCode() == 200) { |
| | | PrintWriter out = response.getWriter(); |
| | | out.write(result); |
| | |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/base/pointMer/exchangeGoodPaymentAliCallback") |
| | | public void addVipPaymentAliCallback(HttpServletRequest request, HttpServletResponse response) { |
| | | public void exchangeGoodPaymentAliCallback(HttpServletRequest request, HttpServletResponse response) { |
| | | try { |
| | | Map<String, String> map = payMoneyUtil.alipayCallback(request); |
| | | if (null != map) { |
| | | String out_trade_no = map.get("out_trade_no"); |
| | | String trade_no = map.get("trade_no"); |
| | | ResultUtil resultUtil = tappService.exchangeAddPaymentCallback(out_trade_no, trade_no, 2); |
| | | ResultUtil resultUtil = tappService.exchangeAddPaymentCallback(out_trade_no, trade_no); |
| | | if (resultUtil.getCode() == 200) { |
| | | PrintWriter out = response.getWriter(); |
| | | out.write("success"); |