陶杰
2024-08-22 ee9032d9baf5f33e376d2d2699136e0a7b26bec7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package com.mzl.flower.web.payment;
 
import com.mzl.flower.service.payment.UserPaymentV3Service;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
 
import javax.servlet.http.HttpServletRequest;
 
@RestController
@RequestMapping("/api/ua/notify/v3/wx")
@Slf4j
public class PaymentCallBackV3Resource {
 
    @Autowired
    private UserPaymentV3Service paymentV3Service;
 
    @RequestMapping(value = "/paid", method = RequestMethod.POST)
    @ResponseBody
    public ResponseEntity<?> handlePayCallback(HttpServletRequest request) {
        log.info("wx pay v3 call back");
        return paymentV3Service.handlePayCallback(request);
    }
 
    @RequestMapping(value = "/refund", method = RequestMethod.POST)
    @ResponseBody
    public ResponseEntity<?> handleRefundCallback(HttpServletRequest request) {
        log.info("wx refund v3 call back");
        return paymentV3Service.handleRefundCallback(request);
    }
 
}