|
|
|
@ -0,0 +1,47 @@
|
|
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2018-2999 广州市蓝海创新科技有限公司 All rights reserved.
|
|
|
|
|
*
|
|
|
|
|
* https://www.mall4j.com/
|
|
|
|
|
*
|
|
|
|
|
* 未经允许,不可做商业用途!
|
|
|
|
|
*
|
|
|
|
|
* 版权所有,侵权必究!
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
package com.yami.shop.api.controller; // 定义类所在的包
|
|
|
|
|
|
|
|
|
|
import lombok.AllArgsConstructor; // 引入Lombok的@AllArgsConstructor注解
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestMapping; // 引入Spring的@RequestMapping注解
|
|
|
|
|
import org.springframework.web.bind.annotation.RestController; // 引入Spring的@RestController注解
|
|
|
|
|
import io.swagger.v3.oas.annotations.Hidden; // 引入Swagger的Hidden注解
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* PayNoticeController类,用于处理支付通知。
|
|
|
|
|
* @作者 lanhai
|
|
|
|
|
*/
|
|
|
|
|
@Hidden // 隐藏这个控制器,不在Swagger文档中展示
|
|
|
|
|
@RestController // 标注这是一个控制器类,并且其返回结果直接写入HTTP响应体中,而不是视图名称
|
|
|
|
|
@RequestMapping("/notice/pay") // 定义请求路径的根地址为/notice/pay
|
|
|
|
|
@AllArgsConstructor // 使用Lombok注解生成全参构造函数
|
|
|
|
|
public class PayNoticeController {
|
|
|
|
|
// 模拟支付不需要回调
|
|
|
|
|
// /**
|
|
|
|
|
// * 小程序支付
|
|
|
|
|
// */
|
|
|
|
|
// private final WxPayService wxMiniPayService;
|
|
|
|
|
//
|
|
|
|
|
// private final PayService payService;
|
|
|
|
|
//
|
|
|
|
|
// @RequestMapping("/order")
|
|
|
|
|
// public ServerResponseEntity<Void> submit(@RequestBody String xmlData) throws WxPayException {
|
|
|
|
|
// WxPayOrderNotifyResult parseOrderNotifyResult = wxMiniPayService.parseOrderNotifyResult(xmlData);
|
|
|
|
|
//
|
|
|
|
|
// String payNo = parseOrderNotifyResult.getOutTradeNo();
|
|
|
|
|
// String bizPayNo = parseOrderNotifyResult.getTransactionId();
|
|
|
|
|
//
|
|
|
|
|
// // 根据内部订单号更新order settlement
|
|
|
|
|
// payService.paySuccess(payNo, bizPayNo);
|
|
|
|
|
//
|
|
|
|
|
// return ServerResponseEntity.success();
|
|
|
|
|
// }
|
|
|
|
|
}
|