mirror of
https://gitee.com/egzosn/pay-java-parent.git
synced 2026-06-09 02:42:20 +08:00
jspai独立接口,优化案例
This commit is contained in:
@@ -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);
|
||||
}
|
||||
//这里开发者自行处理
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user