package com.jeequan.jeepay.core.model.params.flpay;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.jeequan.jeepay.core.annotate.ChannelMchId;
import com.jeequan.jeepay.core.constants.ChannelMchIdTypeEnum;
import com.jeequan.jeepay.core.model.params.IsvParams;
import com.jeequan.jeepay.core.utils.StringKit;
import lombok.Data;
import org.apache.commons.lang3.StringUtils;

/**
 * 福禄 配置信息
 */
@Data
public class FlpayIsvParams extends IsvParams {

    /** 是否沙箱环境  1-是 */
    private String appId;

    /** 密钥 **/
    private String secret;

    private String taskNo;

    @Override
    public String deSenData() {
        FlpayIsvParams isvParams = this;
        if (StringUtils.isNotBlank(this.secret)) {
            isvParams.setSecret(StringKit.autoDesensitization(this.secret));
        }
        return ((JSONObject) JSON.toJSON(isvParams)).toJSONString();
    }
}
