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);
|
}
|
|
}
|