96 lines
2.3 KiB
Java
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package com.cdzy.payment.service;
import com.alibaba.fastjson2.JSONObject;
import com.cdzy.payment.model.dto.AmountRefundDto;
import com.cdzy.payment.model.dto.HandleNotifyResult;
import com.wechat.pay.java.service.payments.model.Transaction;
import com.wechat.pay.java.service.refund.model.Refund;
import jakarta.servlet.http.HttpServletRequest;
/**
* 微信支付服务类JSAPI支付小程序
*
* @author dingchao
* @date 2025/4/25
* @modified by:
*/
public interface WxPayService {
/**
* 关闭订单
*
* @param outTradeNo 商户(骑行)订单号
* @return
*/
boolean closeOrder(String outTradeNo);
/**
* JSAPI支付下单
*
* @param outTradeNo 订单id
* @return 下单成功返回true否则返回false
*/
JSONObject prepay(String outTradeNo);
/**
* 通过商户(骑行)订单号查询支付订单
*
* @param outTradeNo 商户(骑行)订单号
* @return 支付订单信息
*/
Transaction queryOrderByOutTradeNo(String outTradeNo);
/**
* 通过订单号查询支付订单状态
*
* @param outTradeNo 商户(骑行)订单号
* @return 支付订单信息
*/
HandleNotifyResult queryOrderStatusByOutTradeNo(String outTradeNo);
/**
* 处理支付回调
*
* @param request 回调请求
* @return 支付订单信息
*/
HandleNotifyResult handlePayNotify(HttpServletRequest request);
/**
* 退款申请
*
* @param outTradeNo 商户(骑行)订单号
* @param reason 退款原因
* @return 退款信息id
*/
String refund(String outTradeNo, String reason);
/**
* 通过商户退款单号查询退款信息
*
* @param outRefundNo 商户退款订单号
* @return 退款信息
*/
Refund queryRefundByOutNo(String outRefundNo);
/**
* 通过商户退款单号查询退款信息状态
*
* @param outRefundNo 商户退款订单号
* @return 退款信息
*/
HandleNotifyResult queryRefundStatusByOutNo(String outRefundNo);
/**
* 处理支退款回调
*
* @param request 回调请求
* @return 退款订单信息
*/
HandleNotifyResult handleRefundNotify(HttpServletRequest request);
}