package com.crm.pay.service;

import com.crm.pay.dto.finance.withdraw.automatic.FinanceWithdrawUcardpayDto;
import com.crm.pay.entity.FinanceDepositUcardEntity;
import com.crm.pay.entity.callback.UcardPayCallbackEntity;
import com.crm.pay.entity.finance.withdraw.automatic.FinanceWithdrawInfoEntity;
import com.crm.pay.entity.finance.withdraw.automatic.FinanceWithdrawUcardpayEntity;
import com.crm.pay.entity.ucard.CardSendEmailCodeEntity;
import com.crm.rely.backend.core.dto.base.BaseResultDto;
import com.crm.rely.backend.core.exception.ServiceException;
import com.crm.rely.backend.model.entity.finance.deposit.FinanceDepositAddEntity;

public interface UcardPayService {
    /**
     * 支付
     *
     * @param balanceSaveEntity
     * @return
     * @throws ServiceException
     */
    String save(FinanceDepositAddEntity balanceSaveEntity) throws Exception;

    /**
     * 回调
     * @param callbackEntity
     * @throws Exception
     */
    BaseResultDto callback(UcardPayCallbackEntity callbackEntity)throws Exception;

    /**
     * 验证cvv，pin，邮箱验证码
     */
    void validated(FinanceDepositUcardEntity entity) throws ServiceException;

    BaseResultDto pay(FinanceDepositUcardEntity entity) throws Exception;

    FinanceWithdrawUcardpayDto withdrawInfo(FinanceWithdrawInfoEntity entity) throws Exception;

    String withdraw(FinanceWithdrawUcardpayEntity entity) throws Exception;

    BaseResultDto withdrawCallback(Integer withdrawType, UcardPayCallbackEntity callbackEntity) throws Exception;

    //void sendEmailCode(CardSendEmailCodeEntity entity) throws ServiceException;
}
