package com.izouma.nineth.service.pay;

import com.izouma.nineth.domain.UserBankCard;
import com.izouma.nineth.dto.pay.*;

import java.util.Map;

/**
 * 统一支付接口,不建议直接使用
 *
 */
@Deprecated
public interface UniformPayService {

    /**
     * 支付请求
     * @param request
     * @return
     */
    UniformPayResult pay(UniformPayRequest request) throws Exception;


    /**
     * 通知处理（签名校验，数据提取等操作）
     * @param request
     * @return
     */
    UniformNotifyResult notify(UniformNotifyRequest request) throws Exception;

    /**
     * 退款操作，需要更改支付记录为退款
     * @param orderNo
     * @return
     */
    Map<String, Object> refund(String orderNo, String refundReason) throws Exception;

    /**
     * 退款通知
     * @param request
     * @return
     * @throws Exception
     */
    UniformNotifyResult refundNotify(UniformNotifyRequest request) throws Exception;

    /**
     * 转账通知
     * @param request
     * @return
     * @throws Exception
     */
    UniformNotifyResult transferNotify(UniformNotifyRequest request) throws Exception;

    /**
     * 绑定银行卡
     * @throws Exception
     */
    UserBankCard addBankCard(UniformBindBank bindBank) throws Exception;

    /**
     * 解绑银行卡
     * @param userId
     * @throws Exception
     */
    void removeBankCard(Long userId) throws Exception;

    /**
     * 检查是否绑卡
     * @param userId
     * @return
     */
    boolean isBindBankCard(Long userId);



}
