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