package com.cf.imes.module.system.service.pay.factory.impl;

import com.cf.imes.framework.pay.core.client.dto.order.PayOrderRespDTO;
import com.cf.imes.module.system.controller.admin.pay.vo.PayOrderUnifiedReqDTO;

import java.util.Map;

/**
 * 支付处理器抽象类
 *
 * @author Gqr
 * @since 2025/4/15 15:47
 */
public abstract class AbstractPayHandler {

    /**
     * 统一支付
     *
     * @param reqDTO
     * @return
     */
    public abstract PayOrderRespDTO unifiedOrder(PayOrderUnifiedReqDTO reqDTO) throws Throwable;

    /**
     * 查询支付订单
     *
     * @param outTradeNo
     */
    public abstract PayOrderRespDTO queryPayOrder(String outTradeNo) throws Throwable;


    /**
     * 解析支付回调数据
     *
     * @param params
     * @param body
     * @return
     */
    public abstract PayOrderRespDTO doParseOrderNotify(Map<String, String> params, String body, Map<String, String> headers) throws Throwable;
}
