xiaoyong931011
2022-09-23 a740f17dab6666c30c680f693950ea0be6d6a16c
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
55
package cc.mrbird.febs.pay.service.impl;
 
 
import cc.mrbird.febs.pay.model.JsApiPayReqData;
import cc.mrbird.febs.pay.util.WechatConfigure;
 
/**
 * User: rizenguo
 * Date: 2014/10/29
 * Time: 16:03
 */
public class JsApiPayService extends BaseService{
 
    public JsApiPayService() throws Exception {
        super(WechatConfigure.UNIFIEDORDER, WechatConfigure.HttpsRequestClassName);
    }
 
    /**
     * 请求支付服务
     * @param jsApiPayReqData 这个数据对象里面包含了API要求提交的各种数据字段
     * @return API返回的数据
     * @throws Exception
     */
    public String request(JsApiPayReqData jsApiPayReqData) throws Exception {
 
        //--------------------------------------------------------------------
        //发送HTTPS的Post请求到API地址
        //--------------------------------------------------------------------
        String responseString = sendPost(jsApiPayReqData);
 
        return responseString;
    }
    
    
    
    
    /**
     * 请求openid
     * @param 
     * @return API返回的数据
     * @throws Exception
     */
    public String requestOpenid(JsApiPayReqData jsApiPayReqData) throws Exception {
 
        //--------------------------------------------------------------------
        //发送HTTPS的Post请求到API地址
        //--------------------------------------------------------------------
        String responseString = sendPost(jsApiPayReqData);
 
        return responseString;
    }
    
    
    
}