GeezerVison is showing github.com — 针对拦截器进行优化,简化开发者判断处理 · GitTeng/pay-java-parent@13c501b
File tree
Expand file treeCollapse file tree
Open diff view settings
pay-java-ali/src/main/java/com/egzosn/pay/ali/before/api
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: pay-java-ali/src/main/java/com/egzosn/pay/ali/before/api/AliPayService.java +14-4Lines changed: 14 additions & 4 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
6 | 6 | import com.egzosn.pay.common.api.BasePayService; |
7 | 7 | import com.egzosn.pay.common.api.Callback; |
8 | 8 | import com.egzosn.pay.common.api.PayConfigStorage; |
9 | | -import com.egzosn.pay.common.bean.MethodType; |
10 | | -import com.egzosn.pay.common.bean.PayOrder; |
11 | | -import com.egzosn.pay.common.bean.PayOutMessage; |
12 | | -import com.egzosn.pay.common.bean.TransactionType; |
| 9 | +import com.egzosn.pay.common.bean.*; |
13 | 10 | import com.egzosn.pay.common.bean.result.PayException; |
14 | 11 | import com.egzosn.pay.common.exception.PayErrorException; |
15 | 12 | import com.egzosn.pay.common.http.HttpConfigStorage; |
@@ -253,6 +250,19 @@ public Map<String, Object> getParameter2Map(Map<String, String[]> parameterMap, |
253 | 250 | public PayOutMessage getPayOutMessage(String code, String message) { |
254 | 251 | return PayOutMessage.TEXT().content(code.toLowerCase()).build(); |
255 | 252 | } |
| 253 | + |
| 254 | + /** |
| 255 | + * 获取成功输出消息,用户返回给支付端 |
| 256 | + * 主要用于拦截器中返回 |
| 257 | + * @param payMessage 支付回调消息 |
| 258 | + * @return 返回输出消息 |
| 259 | + */ |
| 260 | + @Override |
| 261 | + public PayOutMessage successPayOutMessage(PayMessage payMessage) { |
| 262 | + return PayOutMessage.TEXT().content("success").build(); |
| 263 | + } |
| 264 | + |
| 265 | + |
256 | 266 | /** |
257 | 267 | * 获取输出消息,用户返回给支付端, 针对于web端 |
258 | 268 | * |
|