package com.jeequan.jeepay.thirdparty.channel;


import com.jeequan.jeepay.core.interfaces.paychannel.IChannelAccountService;
import com.jeequan.jeepay.service.impl.SysConfigService;
import com.jeequan.jeepay.thirdparty.service.ConfigContextQueryService;
import com.jeequan.jeepay.thirdparty.util.ChannelCertConfigKitBean;
import org.springframework.beans.factory.annotation.Autowired;

/*
* 提现接口抽象类
*
* @author zx
*
* @date 2021/6/8 17:18
*/
public abstract class AbstractChannelAccountService implements IChannelAccountService {

    @Autowired protected SysConfigService sysConfigService;
    @Autowired protected ChannelCertConfigKitBean channelCertConfigKitBean;
    @Autowired protected ConfigContextQueryService configContextQueryService;


    protected String getPaySiteUrl() {
        return sysConfigService.getDBApplicationConfig().getPaySiteUrl();
    }

    protected String getNotifyUrl(){
        return getPaySiteUrl() + "/api/channel/cashout/notify/" + getIfCode();
    }

    protected String getNotifyUrl(String rid){
        return getPaySiteUrl() + "/api/channel/cashout/notify/" + getIfCode() + "/" + rid;
    }

}
