File was renamed from src/main/java/cc/mrbird/febs/pay/controller/PayCallBackController.java |
| | |
| | | package cc.mrbird.febs.pay.controller; |
| | | |
| | | import cc.mrbird.febs.common.entity.FebsResponse; |
| | | import cc.mrbird.febs.pay.properties.AliPayProperties; |
| | | import cc.mrbird.febs.pay.service.IPayService; |
| | | import cc.mrbird.febs.video.dto.VipBuyDto; |
| | | import com.alipay.api.AlipayApiException; |
| | | import com.alipay.api.internal.util.AlipaySignature; |
| | | import com.ijpay.alipay.AliPayApi; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping(value = "/api/pay") |
| | | public class PayCallBackController { |
| | | @Api(value = "PayController", tags = "支付") |
| | | public class PayController { |
| | | |
| | | @Autowired |
| | | private IPayService payService; |
| | |
| | | return "failure"; |
| | | } |
| | | } |
| | | |
| | | @ApiOperation(value = "支付宝支付") |
| | | @PostMapping(value = "/pay") |
| | | public FebsResponse pay(@RequestBody VipBuyDto vipBuyDto) { |
| | | return new FebsResponse().success().data(payService.aliPay(vipBuyDto)); |
| | | } |
| | | } |