wlzboy
5 天以前 cfe0b79fbea0fb1d7a5a796e71ada7d3b7812046
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package com.ruoyi.payment.interfaces.callback;
 
import com.ruoyi.payment.domain.model.PaymentOrder;
import com.ruoyi.payment.domain.model.PaymentTransaction;
 
/**
 * 支付回调接口
 * 
 * 使用方式:
 * 在主项目中实现此接口并注册为Spring Bean,支付成功后会自动调用:
 * 
 * @Component
 * public class MyPaymentCallback implements PaymentCallback {
 *     @Override
 *     public void onPaymentSuccess(PaymentOrder order, PaymentTransaction transaction) {
 *         // 处理支付成功业务逻辑
 *         log.info("订单支付成功: {}", order.getBizOrderId());
 *     }
 * }
 * 
 * @author ruoyi
 */
public interface PaymentCallback {
 
    /**
     * 支付成功回调
     * 
     * @param order 支付订单
     * @param transaction 支付交易
     */
    void onPaymentSuccess(PaymentOrder order, PaymentTransaction transaction);
}