对接支付开发

This commit is contained in:
hejinbo
2023-09-09 16:50:34 +08:00
parent 362d433bb3
commit 4d2d8b0976
47 changed files with 2503 additions and 2 deletions
@@ -0,0 +1,66 @@
package com.ruoyi;
import com.ruoyi.dto.*;
import com.ruoyi.exceptions.TradeException;
public interface ElegentPay {
/**
* 统一下单接口
* @param payRequest 支付请求
* @param tradeType 交易类型
* @param platform 平台
* @return 支付响应
* @throws TradeException
*/
PayResponse requestPay(PayRequest payRequest, String tradeType, String platform) throws TradeException;
/**
* 关闭订单
* @param orderSn 订单号
* @param platform 平台
* @return 是否成功关闭订单
* @throws TradeException
*/
Boolean closePay(String orderSn, String platform) throws TradeException;
/**
* 退款
* @param refundRequest 退款请求封装对象
* @param platform 平台
* @return 是否成功退款
* @throws TradeException
*/
Boolean refund(RefundRequest refundRequest, String platform) throws TradeException;
/**
* 根据订单号查询订单
* @param orderSn 订单号
* @param platform 平台
* @return 查询响应对象
* @throws TradeException
*/
QueryResponse queryTradingOrderNo(String orderSn , String platform) throws TradeException;
/**
* 查询单笔退款API
* @param orderSn 订单号
* @param platform 平台
* @return 查询退款响应对象
* @throws TradeException
*/
QueryRefundResponse queryRefundTrading(String orderSn , String platform) throws TradeException;
/**
* 获得openID
* @param code
* @return
*/
public String getOpenid(String code, String platform);
}