zj
2024-06-03 287ac389edd047696d956afafdb855a93830bc0c
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
package com.nq.controller.protol;
 
 
import com.nq.common.ServerResponse;
import com.nq.service.IPayService;
import javax.servlet.http.HttpServletRequest;
 
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
 
 
@Controller
@RequestMapping({"/user/pay/"})
public class UserPayController {
    private static final Logger log = LoggerFactory.getLogger(UserPayController.class);
 
    @Autowired
    IPayService iPayService;
 
    @RequestMapping({"juhe1.do"})
    @ResponseBody
    public ServerResponse juhe1(@RequestParam("payType") String payType, @RequestParam("payAmt") String payAmt, HttpServletRequest request) throws Exception {
        log.info("发起线上支付 payType = {} payAmt = {}", payType, payAmt);
        return this.iPayService.juhenewpay(payType, payAmt, request);
    }
 
    @RequestMapping({"juheh5.do"})
    @ResponseBody
    public ServerResponse juheh5(@RequestParam("payType") String payType, @RequestParam("payAmt") String payAmt, HttpServletRequest request) throws Exception {
        log.info("发起线上支付 payType = {} payAmt = {}", payType, payAmt);
        return this.iPayService.juheh5pay(payType, payAmt, request);
    }
 
    @RequestMapping({"juhenewpayNotify.do"})
    public String juhenewpayNotify(HttpServletRequest request) throws Exception {
        iPayService.juhe1Notify(request);
        return "success";
    }
 
    @RequestMapping({"flyPay.do"})
    @ResponseBody
    public ServerResponse flyPay(@RequestParam("payType") String payType,
                                 @RequestParam("payAmt") String payAmt,
                                 @RequestParam("currency") String currency, HttpServletRequest request) {
        log.info("发起 fly 线上支付 payType = {} payAmt = {} currency = {}", new Object[]{payType, payAmt, currency});
        return this.iPayService.flyPay(payType, payAmt, currency, request);
    }
 
}