package com.tzy.framework.pay.service;

import com.tzy.common.dto.InDto;
import com.tzy.common.dto.OutDTO;
import com.tzy.framework.pay.dto.PaymentInfoResponseDto;
import com.tzy.framework.pay.dto.PaymentRequestDto;
import com.tzy.framework.pay.dto.RefundRequestDto;
import com.tzy.framework.pay.dto.ResultMap;

import java.math.BigDecimal;

/**
 * 微信支付
 */
public interface WxPayService {

    /**
     * @Description: 微信支付统一下单
     * @param inDto
     * @param orderNo: 订单编号
     * @param amount: 实际支付金额
     * @param body: 订单描述
     * @Author:
     * @Date: 2019/8/1
     * @return
     */
    ResultMap unifiedOrder(InDto inDto, String orderNo, BigDecimal amount, String body) ;

    /**
     * @Description: 微信支付统一下单
     * @param paymentRequestDto
     * @return
     */
    public ResultMap unifiedOrder(PaymentRequestDto paymentRequestDto);
    /**
     * 查询已支付订单
     * @param orderNo
     * @return
     */
    public OutDTO searchOrder(String orderNo);
    /**
     * 查询已支付订单
     * @param orderNo
     * @return
     */
    public PaymentInfoResponseDto queryOrder(String appid,String orderNo);
    /**
     * 关闭已支付的订单
     * @param orderNo
     * @return
     */
    public OutDTO closeOrder(String orderNo);
    /**
     * 关闭订单-新
     * @param orderNo
     * @return
     */
    public ResultMap closeOrderNew(String appid,String orderNo);
    /**
     * 退款
     * @param orderNo
     * @param amount
     * @param refundReason
     * @return
     */
    public ResultMap wxRefund(String appid,String orderNo, BigDecimal amount, String refundReason);
    /**
     * @Description: 微信支付统一下单
     * @param paymentRequestDto
     * @return
     */
    public ResultMap unifiedOrderNew(PaymentRequestDto paymentRequestDto);
    /**
     * 查询已支付订单
     * @param paymentRequestDto
     * @return
     */
    public PaymentInfoResponseDto queryOrder(PaymentRequestDto paymentRequestDto);
    /**
     * 退款
     * @param refundRequestDto
     * @return
     */
    public ResultMap wxRefund(RefundRequestDto refundRequestDto);

}
