package com.kym.service.wechat;

import com.wechat.pay.java.service.payments.jsapi.model.PrepayWithRequestPaymentResponse;
import com.wechat.pay.java.service.refund.model.Refund;
import jakarta.servlet.http.HttpServletRequest;
import lombok.SneakyThrows;
import org.springframework.http.ResponseEntity;
import org.springframework.transaction.annotation.Transactional;
import java.io.IOException;

/**
 * @author skyline
 * @description
 * @date 2023-08-11 19:05
 */
public interface WxPayService {
    void applyWxRefund(Long userId,String reason);

    void wxRefund(long refundLogId);

    void batchWxRefund(java.util.List<Long> refundLogIds);

    Refund queryByOutRefundNo(String outRefundNo);

    @SneakyThrows
    ResponseEntity<Object> wxRefundNotify(HttpServletRequest request);

    @Transactional
    PrepayWithRequestPaymentResponse wxPay(Long rechargeConfigId);

    ResponseEntity<Object> wxNotify(HttpServletRequest request) throws IOException;

    @Transactional
    PrepayWithRequestPaymentResponse promotionPay(String promotionToken);

    void offlineRecharge(Long userId, Integer amount, Integer grantsAmount, String remark);


    //================================================================发票=====================================================================


}
