package cn.novalon.gym.manage.payment.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * 支付宝配置属性
 * 沙箱环境配置
 */
@Data
@Component
@ConfigurationProperties(prefix = "alipay")
public class AlipayProperties {

    /**
     * 应用ID
     */
    private String appId;

    /**
     * 应用私钥 (PKCS#8格式)
     */
    private String appPrivateKey;

    /**
     * 支付宝公钥
     */
    private String alipayPublicKey;

    /**
     * 签名方式
     */
    private String signType = "RSA2";

    /**
     * 编码格式
     */
    private String charset = "UTF-8";

    /**
     * 网关地址
     * 沙箱环境: https://openapi-sandbox.dl.alipaydev.com/gateway.do
     * 正式环境: https://openapi.alipay.com/gateway.do
     */
    private String gateway;

    /**
     * 异步通知地址
     */
    private String notifyUrl;

    /**
     * 是否沙箱环境
     */
    private boolean sandbox = true;
}
