Pu Zhibing
5 天以前 3244b550596e0330031b3f4547356927df83b0ad
ruoyi-api/ruoyi-api-payment/src/main/java/com/ruoyi/payment/api/factory/AliPaymentFallbackFactory.java
@@ -2,6 +2,8 @@
import com.ruoyi.common.core.domain.R;
import com.ruoyi.payment.api.feignClient.AliPaymentClient;
import com.ruoyi.payment.api.model.RefundReq;
import com.ruoyi.payment.api.model.RefundResp;
import com.ruoyi.payment.api.vo.AliPaymentReq;
import com.ruoyi.payment.api.vo.AliPaymentResp;
import com.ruoyi.payment.api.vo.AliQueryOrder;
@@ -28,17 +30,22 @@
    
            @Override
            public R<AliPaymentResp> payment(AliPaymentReq req) {
                throw new RuntimeException("调起支付宝小程序支付失败:" + throwable.getMessage());
                return R.fail("调起支付宝小程序支付失败:" + throwable.getMessage());
            }
    
            @Override
            public R<AliQueryOrder> query(String outTradeNo) {
                throw new RuntimeException("查询支付订单失败:" + throwable.getMessage());
                return R.fail("查询支付订单失败:" + throwable.getMessage());
            }
    
            @Override
            public void close(String outTradeNo) {
                throw new RuntimeException("关闭支付订单失败:" + throwable.getMessage());
                R.fail("关闭支付订单失败:" + throwable.getMessage());
            }
            @Override
            public R<RefundResp> refund(RefundReq dto) {
                return R.fail("支付宝退款失败:" + throwable.getMessage());
            }
        };
    }