package com.ycwl.basic.service.mobile;

import com.ycwl.basic.model.wx.WXPayOrderReqVO;
import com.ycwl.basic.model.wx.WechatCallbackSuccessData;

import com.ycwl.basic.pay.entity.PayResponse;
import jakarta.servlet.http.HttpServletRequest;
import java.io.IOException;
import java.util.Map;

public interface WxPayService {

    /**
     * 微信预支付
     */
    Map<String, Object> createOrder(Long scenicId, WXPayOrderReqVO req) throws Exception;

    /**
     * 微信支付回调
     */
    void payNotify(HttpServletRequest request);

    PayResponse payNotify(Long scenicId, HttpServletRequest request);


    /**
     * 微信支付结果查询
     */
    WechatCallbackSuccessData queryPay(Long orderId);

    /**
     * 订单退款
     *
     * @param orderId 订单id（订单编号）
     * @return
     * @throws Exception
     */
    Boolean refundOrder(String orderId) throws Exception;

    /**
     * 微信退款回调
     */
    boolean refundNotify(Long scenicId, HttpServletRequest request) throws IOException;

    /**
     * 关闭订单
     *
     * @param orderId 订单id（订单编号）
     */
    void closeOrder(String orderId) ;

}
