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); }