package com.hc.business.service;

import com.alipay.api.AlipayApiException;
import com.hc.core.utils.pay.browser.alipay.bean.AliPayRefundBean;
import com.hc.core.utils.pay.browser.alipay.bean.AliPayBean;
import org.springframework.stereotype.Component;
import java.util.Map;

/**
 * @author 10696
 */

@Component
public interface AliPayService {

    /**
     * 支付宝支付
     *
     * @param aliPayBean 支付对象
     * @return 实例对象
     * @throws AlipayApiException
     */
    Map<String, String> alipay(AliPayBean aliPayBean) throws AlipayApiException;


    /**
     * 支付成功回调
     *
     * @param outTradeNo  订单号
     * @param tradeNo     支付宝交易号
     * @param tradeStatus 支付状态
     */
    void returnNotifyUrlInfo(String outTradeNo, String tradeNo, String tradeStatus);

    /**
     * 支付宝退款
     *
     * @param aliPayRefundBean 退款对象
     * @return 实例对象
     * @throws AlipayApiException
     */
    Map<String, String> refund(AliPayRefundBean aliPayRefundBean) throws AlipayApiException;

}
