package com.crm.pay.service;

import com.crm.pay.dto.finance.withdraw.automatic.FinanceWithdrawIbitDto;
import com.crm.pay.entity.callback.IbitCallbackEntity;
import com.crm.pay.entity.finance.withdraw.automatic.FinanceWithdrawIbitEntity;
import com.crm.pay.entity.finance.withdraw.automatic.FinanceWithdrawInfoEntity;
import com.crm.rely.backend.model.entity.custom.info.CustomInfoEntity;
import com.crm.rely.backend.model.entity.finance.deposit.FinanceDepositAddEntity;
import com.crm.rely.backend.model.entity.finance.deposit.FinanceMerchantDepositAddEntity;

public interface IbitService {

    /**
     * 支付
     *
     * @param balanceSaveEntity 支付实体
     * @return
     * @throws Exception
     */
    String pay(FinanceDepositAddEntity balanceSaveEntity, CustomInfoEntity infoEntity) throws Exception;

    String pay(FinanceMerchantDepositAddEntity balanceSaveEntity) throws Exception;

    /**
     * 回调
     *
     * @param callbackEntity 回调实体
     * @throws Exception
     */
    void callback(IbitCallbackEntity callbackEntity) throws Exception;

    void callback(IbitCallbackEntity callbackEntity, String payType) throws Exception;


    FinanceWithdrawIbitDto withdrawInfo(FinanceWithdrawInfoEntity entity) throws Exception;

    void withdraw(FinanceWithdrawIbitEntity entity) throws Exception;

    String withdrawCallback(Integer withdrawType, IbitCallbackEntity callbackEntity) throws Exception;
}
