jspai独立接口,优化案例

This commit is contained in:
egzosn
2024-08-29 11:38:36 +08:00
parent 2ce5c82ccf
commit bffcadc22d
2 changed files with 9 additions and 2 deletions

View File

@@ -213,7 +213,7 @@ public class PayController {
//校验
if (payResponse.getService().verify(new NoticeParams(params))) {
PayMessage message = new PayMessage(params, storage.getPayType());
//支付校验通过后的处理,,路由的方式已经不建议使用了
//支付校验通过后的处理,,路由的方式已经不建议使用了
payResponse.getRouter().route(message);
}
//这里开发者自行处理

View File

@@ -4,6 +4,7 @@ import javax.annotation.Resource;
import org.springframework.beans.factory.config.AutowireCapableBeanFactory;
import com.egzosn.pay.common.api.BasePayService;
import com.egzosn.pay.common.api.PayConfigStorage;
import com.egzosn.pay.common.api.PayMessageHandler;
import com.egzosn.pay.common.api.PayMessageRouter;
@@ -91,7 +92,7 @@ public class PayResponse {
* 配置路由
*
* @param payId 指定账户id用户多微信支付多支付宝支付
* @deprecated 不再推荐使用路由方式回调或拦截器直接在payService中设置并获取使用
* @deprecated 不再推荐使用路由方式回调或拦截器直接在payService中设置并获取使用,回调拦截器已提供对应的实现方式:{@link BasePayService#setPayMessageHandler(com.egzosn.pay.common.api.PayMessageHandler)} 与{@link BasePayService#addPayMessageInterceptor(com.egzosn.pay.common.api.PayMessageInterceptor)}
*/
@Deprecated
private void buildRouter(Integer payId) {
@@ -148,6 +149,12 @@ public class PayResponse {
return service;
}
/**
* 不建议使用, 回调拦截器已提供对应的实现方式:{@link BasePayService#setPayMessageHandler(com.egzosn.pay.common.api.PayMessageHandler)} 与{@link BasePayService#addPayMessageInterceptor(com.egzosn.pay.common.api.PayMessageInterceptor)}
*
* @return
*/
@Deprecated
public PayMessageRouter getRouter() {
return router;
}