package com.slodon.b2b2c.starter.entity;


import com.slodon.b2b2c.core.config.DomainUrlUtil;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 支付宝支付配置信息
 */
@Data
@NoArgsConstructor
public class AliPayProperties {

    public AliPayProperties(String partner, String privateKey, String publicKey, String appId) {
        this.partner = partner;
        this.privateKey = privateKey;
        this.publicKey = publicKey;
        this.appId = appId;
    }

    /**
     * 网关地址
     **/
    public final String url = "https://openapi.alipay.com/gateway.do";

    /**
     * 合作身份者ID，以2088开头由16位纯数字组成的字符串
     **/
    public String partner;

    /**
     * 商户的私钥
     **/
    public String privateKey;

    /**
     * 商户的公钥
     **/
    public String publicKey;

    /**
     * 商户的app_id
     **/
    public String appId;

    /**
     * 应用公钥证书
     */
    public String certPath = DomainUrlUtil.APP_CERT_PATH;

    /**
     * 支付宝公钥证书
     */
    public String aliPayPublicCertPath = DomainUrlUtil.ALIPAY_CERT_PATH;

    /**
     * 指定根证书
     */
    public String rootCertPath = DomainUrlUtil.ALIPAY_ROOT_CERT_PATH;

    /**
     * 字符编码格式 目前支持 gbk 或 utf-8
     **/
    public String inputCharset = "utf-8";

    /**
     * 签名方式 不需修改
     **/
    public String signType = "RSA2";

}
