wlzboy
6 天以前 7de1396e315896dbc72a9d54e44f77434ea90f18
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 com.ruoyi.payment.infrastructure.config;
 
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
 
/**
 * 支付宝配置
 * 
 * @author ruoyi
 */
@Data
@Component
@ConfigurationProperties(prefix = "payment.alipay")
public class AlipayConfig {
 
    /** 应用ID */
    private String appId;
 
    /** 商户私钥 */
    private String privateKey;
 
    /** 支付宝公钥 */
    private String alipayPublicKey;
 
    /** 服务器地址 */
    private String serverUrl;
 
    /** 回调地址 */
    private String notifyUrl;
 
    /** 在回调时 是否检查签名 */
    private Boolean checkSign = true;
 
    /** 签名类型 */
    private String signType = "RSA2";
    
    /** 支付方式: OFFICIAL(官方) 或 THIRD_PARTY(第三方) */
    private String paymentMethod = "OFFICIAL";
    
    /** 第三方支付配置 */
    private ThirdPartyConfig thirdParty = new ThirdPartyConfig();
    
    @Data
    public static class ThirdPartyConfig {
        /** 是否启用 */
        private boolean enabled = false;
        /** 第三方接口URL */
        private String url = "https://sys.966120.com.cn/alipay_pay_QR_NotifyUrl.php";
        /** 默认回调地址 */
        private String defaultNotifyUrl = "https://api.966120.com.cn/alipay/DspNotifyUrl.php";
        /** 超时时间(毫秒) */
        private int timeout = 30000;
    }
}