mirror of
https://gitee.com/egzosn/pay-java-parent.git
synced 2026-05-24 03:59:10 +08:00
[pay-common] Add: payBack的新重载方法
This commit is contained in:
@@ -436,6 +436,30 @@ public abstract class BasePayService<PC extends PayConfigStorage> implements Pay
|
||||
return getPayMessageHandler().handle(payMessage, context, this);
|
||||
}
|
||||
|
||||
/**
|
||||
* 使用转换过的参数进行回调处理
|
||||
*
|
||||
* @param data 转化后的参数Map
|
||||
* @return 获得回调响应信息
|
||||
*/
|
||||
@Override
|
||||
public PayOutMessage payBack(Map<String, Object> data) {
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("回调响应:" + JSON.toJSONString(data));
|
||||
}
|
||||
if (!verify(data)) {
|
||||
return getPayOutMessage("fail", "失败");
|
||||
}
|
||||
PayMessage payMessage = this.createMessage(data);
|
||||
Map<String, Object> context = new HashMap<String, Object>();
|
||||
for (PayMessageInterceptor interceptor : interceptors) {
|
||||
if (!interceptor.intercept(payMessage, context, this)) {
|
||||
return successPayOutMessage(payMessage);
|
||||
}
|
||||
}
|
||||
return getPayMessageHandler().handle(payMessage, context, this);
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建消息
|
||||
*
|
||||
|
||||
@@ -379,6 +379,14 @@ public interface PayService<PC extends PayConfigStorage> {
|
||||
*/
|
||||
PayOutMessage payBack(Map<String, String[]> parameterMap, InputStream is);
|
||||
|
||||
/**
|
||||
* 使用转换过的参数进行回调处理
|
||||
*
|
||||
* @param data 转化后的参数Map
|
||||
* @return 获得回调响应信息
|
||||
*/
|
||||
PayOutMessage payBack(Map<String, Object> data);
|
||||
|
||||
/**
|
||||
* 设置支付消息处理器,这里用于处理具体的支付业务
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user