教育训练处考试制证系统后端
“djh”
2025-03-10 ea219f4389c52d0bac442c7a351767160c9814c5
exam-system/src/main/java/com/gkhy/exam/pay/controller/PaymentApiController.java
@@ -6,10 +6,7 @@
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.Base64;
@@ -39,7 +36,7 @@
                paymentService.paySuccess(orderNo, jsonObject.getDate("payTime"));
            }
            jsonObject1.put("orderNo", orderNo);
            jsonObject1.put("status", Boolean.TRUE);
            jsonObject1.put("status", "success");
            return jsonObject1;
        } catch (Exception e) {
            log.info("财政回调处理订单发生错误");
@@ -54,4 +51,15 @@
        String decodedString = new String(byteArray);
        return decodedString;
    }
    @GetMapping({"/confirm"})
    @ApiOperation("回调确认")
    public void notifyConfirm(String orderNo) {
        try {
            paymentService.notifyConfirm(orderNo);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}