package com.yiqi.order.service;

import com.alipay.api.response.AlipayTradeQueryResponse;
import com.yiqi.common.core.domain.R;
import com.yiqi.order.domain.OrderPayInfo;
import com.yiqi.order.domain.dto.*;
import com.yiqi.order.domain.vo.OrderPayResultVO;
import com.yiqi.order.domain.vo.weapp.AppPayRespVO;

/**
 * @author xiaohei
 * @date 2023/12/25
 */
public interface IPayService {

    /**
     * 当面付
     */
    public OrderPayResultVO faceToFacePay(PayOrderFaceToFaceDTO payOrderFaceToFaceDTO);

    /**
     * 订单查询
     */
    public PayResponseDTO orderPayQuery(OrderPayInfo orderPayInfo);

    /**
     * 订单退款查询
     */
    public RefundResponseDTO orderRefundQuery(PayRefundDTO payRefundDTO);

    /**
     * APP支付
     *
     * @param payOrderAppDTO
     */
    public AppPayRespVO appPay(PayOrderAppDTO payOrderAppDTO);

    /**
     * 支付退款
     *
     * @param payRefundDTO
     */
    public String refund(PayRefundDTO payRefundDTO);

    /**
     * 支付退款申请
     *
     * @param payRefundDTO
     */
    public RefundResponseDTO refundApply(PayRefundDTO payRefundDTO);


    public void refundNotify(String orderNo, String refundStatus);

    //<editor-folder desc="支付宝支付相关接口">

    /**
     * 支付宝校验订单状态
     *
     * @param orderNo
     * @return
     */
    public AlipayTradeQueryResponse alipayCheckOrderStatus(String orderNo);


    /**
     * 支付订单号、支付订单号、订单号、交易号
     *
     * @param orderPayNo 支付订单号
     * @param orderNo    订单号
     * @param outTradeNo 交易号
     * @return
     */
    public R unifiePaySuccessNotify(String orderPayNo, String orderNo, String outTradeNo);


    /**
     * 支付订单号、支付订单号、订单号、交易号
     *
     * @param refundNo 支付订单号
     * @param orderNo    订单号
     * @param outTradeNo 交易号
     * @return
     */
    public R unifieRefundSuccessNotify(String refundNo, String orderNo, String outTradeNo);

}
