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;
|
}
|
}
|