Skip to content

Commit eeb6c4f

Browse files
committed
文档相关整理
1 parent a5a0791 commit eeb6c4f

23 files changed

Lines changed: 101 additions & 75 deletions

pay-java-common/src/main/java/com/egzosn/pay/common/bean/CountryCode.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public interface CountryCode {
1616

1717
/**
1818
* 获取国家名称
19-
* @return
19+
* @return 国家名称
2020
*/
2121
String getName();
2222
}

pay-java-common/src/main/java/com/egzosn/pay/common/bean/DefaultCountryCode.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public String getCode() {
3838
/**
3939
* 获取国家名称
4040
*
41-
* @return
41+
* @return 国家名称
4242
*/
4343
@Override
4444
public String getName() {

pay-java-common/src/main/java/com/egzosn/pay/common/http/HttpConfigStorage.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ public void setCertStoreType(CertStoreType certStoreType) {
120120
/**
121121
* 获取证书信息
122122
* @return 证书信息 根据 {@link #getCertStoreType()}进行区别地址与信息串
123+
* @throws IOException 找不到文件异常
123124
*/
124125
public InputStream getKeystoreInputStream() throws IOException {
125126
if (null == keystore) {

pay-java-common/src/main/java/com/egzosn/pay/common/util/XML.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ public static JSONObject toJSONObject(String content) {
7979
* 解析xml并转化为Json值
8080
*
8181
* @param content json字符串
82+
* @param charset 字符编码
8283
* @return Json值
8384
*/
8485
public static JSONObject toJSONObject(String content, Charset charset) {
@@ -264,6 +265,7 @@ public static String getMap2Xml(Map<String, Object> data) {
264265
*
265266
* @param data Map类型数据
266267
* @param rootElementName 最外层节点名称
268+
* @param encoding 字符编码
267269
* @return XML格式的字符串
268270
*/
269271
public static String getMap2Xml(Map<String, Object> data, String rootElementName, String encoding) {
@@ -312,7 +314,7 @@ public static String getMap2Xml(Map<String, Object> data, String rootElementName
312314
*
313315
* @param data Map类型数据
314316
* @param document 文档
315-
* @return XML格式的字符串
317+
* @param element 节点
316318
*/
317319
public static void map2Xml(Map<String, Object> data, Document document, org.w3c.dom.Element element) {
318320
for (Map.Entry<String, Object> entry : data.entrySet()) {

pay-java-common/src/main/java/com/egzosn/pay/common/util/sign/CertDescriptor.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,6 @@ private KeyStore getKeyInfo(String fxKeyFile, String keyPwd, String type) throws
214214
* @param keyPwd 证书密码
215215
* @param type 证书类型
216216
* @return 证书对象
217-
* @throws IOException
218217
*/
219218
public KeyStore getKeyInfo(InputStream fxKeyFile, String keyPwd, String type) {
220219

pay-java-demo/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ public class PayResponse {
159159
160160
*/
161161
//设置ssl证书路径
162-
httpConfigStorage.setKeystorePath(apyAccount.getKeystorePath());
162+
httpConfigStorage.setKeystore(apyAccount.getKeystorePath());
163163
//设置ssl证书对应的密码
164164
httpConfigStorage.setStorePassword(apyAccount.getStorePassword());
165165
return httpConfigStorage;

pay-java-demo/src/main/java/com/egzosn/pay/demo/controller/AliPayController.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@
3333
* 发起支付入口
3434
*
3535
* @author: egan
36-
* @email egzosn@gmail.com
37-
* @date 2016/11/18 0:25
36+
* email egzosn@gmail.com
37+
* date 2016/11/18 0:25
3838
*/
3939
@RestController
4040
@RequestMapping("ali")
@@ -118,6 +118,7 @@ public Map<String, Object> app() {
118118
* 二维码支付
119119
* @param price 金额
120120
* @return 二维码图像
121+
* @throws IOException IOException
121122
*/
122123
@RequestMapping(value = "toQrPay.jpg", produces = "image/jpeg;charset=UTF-8")
123124
public byte[] toWxQrPay( BigDecimal price) throws IOException {
@@ -135,7 +136,7 @@ public byte[] toWxQrPay( BigDecimal price) throws IOException {
135136
* @return 支付结果
136137
*/
137138
@RequestMapping(value = "microPay")
138-
public Map<String, Object> microPay(BigDecimal price, String authCode) throws IOException {
139+
public Map<String, Object> microPay(BigDecimal price, String authCode) {
139140
//获取对应的支付账户操作工具(可根据账户id)
140141
//条码付
141142
PayOrder order = new PayOrder("egan order", "egan order", null == price ? new BigDecimal(0.01) : price, UUID.randomUUID().toString().replace("-", ""), AliTransactionType.BAR_CODE);
@@ -167,6 +168,7 @@ public Map<String, Object> microPay(BigDecimal price, String authCode) throws IO
167168
*
168169
* @return 返回对应的响应码
169170
* @see #payBack(HttpServletRequest)
171+
* @throws IOException IOException
170172
*/
171173
@Deprecated
172174
@RequestMapping(value = "payBackBefore.json")
@@ -197,7 +199,7 @@ public String payBackBefore(HttpServletRequest request) throws IOException {
197199
* 业务处理在对应的PayMessageHandler里面处理,在哪里设置PayMessageHandler,详情查看{@link com.egzosn.pay.common.api.PayService#setPayMessageHandler(com.egzosn.pay.common.api.PayMessageHandler)}
198200
*
199201
* 如果未设置 {@link com.egzosn.pay.common.api.PayMessageHandler} 那么会使用默认的 {@link com.egzosn.pay.common.api.DefaultPayMessageHandler}
200-
*
202+
* @throws IOException IOException
201203
*/
202204
@RequestMapping(value = "payBack.json")
203205
public String payBack(HttpServletRequest request) throws IOException {

pay-java-demo/src/main/java/com/egzosn/pay/demo/controller/PayController.java

Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@
3939
* 发起支付入口
4040
*
4141
* @author: egan
42-
* @email egzosn@gmail.com
43-
* @date 2016/11/18 0:25
42+
* email egzosn@gmail.com
43+
* date 2016/11/18 0:25
4444
*/
4545
@RestController
4646
@RequestMapping
@@ -58,7 +58,7 @@ public ModelAndView index() {
5858
/**
5959
* 这里模拟账户信息增加
6060
*
61-
* @param account
61+
* @param account 支付账户信息
6262
* @return 支付账户信息
6363
*/
6464
@RequestMapping("add")
@@ -76,6 +76,7 @@ public Map<String, Object> add(ApyAccount account) {
7676
* 跳到支付页面
7777
* 针对实时支付,即时付款
7878
*
79+
* @param request 请求
7980
* @param payId 账户id
8081
* @param transactionType 交易类型, 这个针对于每一个 支付类型的对应的几种交易方式
8182
* @param bankType 针对刷卡支付,卡的类型,类型值
@@ -114,7 +115,7 @@ public String toPay(HttpServletRequest request, Integer payId, String transactio
114115
/**
115116
* 跳到支付页面
116117
* 针对实时支付,即时付款
117-
*
118+
* @param request 请求
118119
* @return 跳到支付页面
119120
*/
120121
@RequestMapping(value = "toWxPay.html", produces = "text/html;charset=UTF-8")
@@ -169,7 +170,7 @@ public Map toPay(Integer payId, String openid, BigDecimal price) {
169170
* @return 支付结果
170171
*/
171172
@RequestMapping(value = "microPay")
172-
public Map<String, Object> microPay(Integer payId, String transactionType, BigDecimal price, String authCode) throws IOException {
173+
public Map<String, Object> microPay(Integer payId, String transactionType, BigDecimal price, String authCode) {
173174
//获取对应的支付账户操作工具(可根据账户id)
174175
PayResponse payResponse = service.getPayResponse(payId);
175176

@@ -196,7 +197,9 @@ public Map<String, Object> microPay(Integer payId, String transactionType, BigDe
196197
* @param payId 账户id
197198
* @param transactionType 交易类型, 这个针对于每一个 支付类型的对应的几种交易方式
198199
* @param price 金额
200+
*
199201
* @return 二维码图像
202+
* @throws IOException IOException
200203
*/
201204
@RequestMapping(value = "toQrPay.jpg", produces = "image/jpeg;charset=UTF-8")
202205
public byte[] toWxQrPay(Integer payId, String transactionType, BigDecimal price) throws IOException {
@@ -215,7 +218,9 @@ public byte[] toWxQrPay(Integer payId, String transactionType, BigDecimal price)
215218
* @param wxPayId 微信账户id
216219
* @param aliPayId 支付宝id
217220
* @param price 金额
221+
* @param request 请求
218222
* @return 二维码图像
223+
* @throws IOException IOException
219224
*/
220225
@RequestMapping(value = "toWxAliQrPay.jpg", produces = "image/jpeg;charset=UTF-8")
221226
public byte[] toWxAliQrPay(Integer wxPayId, Integer aliPayId, BigDecimal price, HttpServletRequest request) throws IOException {
@@ -243,7 +248,9 @@ public byte[] toWxAliQrPay(Integer wxPayId, Integer aliPayId, BigDecimal price,
243248
* @param wxPayId 微信账户id
244249
* @param aliPayId 支付宝id
245250
* @param price 金额
251+
* @param request 请求
246252
* @return 支付宝与微信平台的判断
253+
* @throws IOException IOException
247254
*/
248255
@RequestMapping(value = "toWxAliPay.html", produces = "text/html;charset=UTF-8")
249256
public String toWxAliPay(Integer wxPayId, Integer aliPayId, BigDecimal price, HttpServletRequest request) throws IOException {
@@ -276,6 +283,7 @@ public String toWxAliPay(Integer wxPayId, Integer aliPayId, BigDecimal price, Ht
276283
*
277284
* @param payId 支付账户id
278285
* @param transactionType 交易类型
286+
* @param price 金额
279287
* @return 支付预订单信息
280288
*/
281289
@RequestMapping("getOrderInfo")
@@ -295,9 +303,10 @@ public Map<String, Object> getOrderInfo(Integer payId, String transactionType, B
295303
* <p>
296304
* 方式二,{@link #payBack(HttpServletRequest, Integer)} 是属于简化方式, 试用与简单的业务场景
297305
*
298-
* @param request
299-
* @param payId
306+
* @param request 请求
307+
* @param payId 账户id
300308
* @return 支付是否成功
309+
* @throws IOException IOException
301310
*/
302311
@RequestMapping(value = "payBackOne{payId}.json")
303312
public String payBackOne(HttpServletRequest request, @PathVariable Integer payId) throws IOException {
@@ -327,11 +336,14 @@ public String payBackOne(HttpServletRequest request, @PathVariable Integer payId
327336
* 支付回调地址
328337
* 方式二
329338
*
330-
* @param request
331-
* @return 拦截器相关增加, 详情查看{@link com.egzosn.pay.common.api.PayService#addPayMessageInterceptor(PayMessageInterceptor)}
332-
* <p></p>
333-
* 业务处理在对应的PayMessageHandler里面处理,在哪里设置PayMessageHandler,详情查看{@link com.egzosn.pay.common.api.PayService#setPayMessageHandler(com.egzosn.pay.common.api.PayMessageHandler)}
339+
* @param request 请求
340+
* @param payId 账户id
341+
* @return 支付是否成功
342+
* @throws IOException IOException
343+
* 拦截器相关增加, 详情查看{@link com.egzosn.pay.common.api.PayService#addPayMessageInterceptor(PayMessageInterceptor)}
334344
* <p>
345+
* 业务处理在对应的PayMessageHandler里面处理,在哪里设置PayMessageHandler,详情查看{@link com.egzosn.pay.common.api.PayService#setPayMessageHandler(com.egzosn.pay.common.api.PayMessageHandler)}
346+
* </p>
335347
* 如果未设置 {@link com.egzosn.pay.common.api.PayMessageHandler} 那么会使用默认的 {@link com.egzosn.pay.common.api.DefaultPayMessageHandler}
336348
*/
337349
@RequestMapping(value = "payBack{payId}.json")
@@ -381,7 +393,7 @@ public Map<String, Object> close(QueryOrder order) {
381393

382394
/**
383395
* 申请退款接口
384-
*
396+
* @param payId 账户id
385397
* @param order 订单的请求体
386398
* @return 返回支付方申请退款后的结果
387399
*/
@@ -435,7 +447,7 @@ public Map<String, Object> secondaryInterface(QueryOrder order) {
435447

436448
/**
437449
* 转账
438-
*
450+
* @param payId 账户id
439451
* @param order 转账订单
440452
* @return 对应的转账结果
441453
*/
@@ -447,7 +459,7 @@ public Map<String, Object> transfer(int payId, TransferOrder order) {
447459

448460
/**
449461
* 转账查询
450-
*
462+
* @param payId 账户id
451463
* @param outNo 商户转账订单号
452464
* @param tradeNo 支付平台转账订单号
453465
* @return 对应的转账订单

pay-java-demo/src/main/java/com/egzosn/pay/demo/controller/PayPalPayController.java

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
* 发起支付入口
2424
*
2525
* @author: egan
26-
* @email egzosn@gmail.com
27-
* @date 2018/05/06 10:30
26+
* email egzosn@gmail.com
27+
* date 2018/05/06 10:30
2828
*/
2929
@RestController
3030
@RequestMapping("payPal")
@@ -99,8 +99,9 @@ public Map<String, Object> refund() {
9999
* return url
100100
* PayPal确认付款调用的接口
101101
* 用户确认付款后,paypal调用的这个方法执行付款
102-
*
102+
* @param request 请求
103103
* @return 付款成功信息
104+
* @throws IOException IOException
104105
*/
105106
@GetMapping(value = "payBackBefore.json")
106107
public String payBackBefore(HttpServletRequest request) throws IOException {
@@ -117,10 +118,10 @@ public String payBackBefore(HttpServletRequest request) throws IOException {
117118
/**
118119
* 支付回调地址
119120
*
120-
* @param request
121-
*
122-
* @return
121+
* @param request 请求
123122
*
123+
* @return 结果
124+
* @throws IOException IOException
124125
* 业务处理在对应的PayMessageHandler里面处理,在哪里设置PayMessageHandler,详情查看{@link com.egzosn.pay.common.api.PayService#setPayMessageHandler(com.egzosn.pay.common.api.PayMessageHandler)}
125126
*
126127
* 如果未设置 {@link com.egzosn.pay.common.api.PayMessageHandler} 那么会使用默认的 {@link com.egzosn.pay.common.api.DefaultPayMessageHandler}

pay-java-demo/src/main/java/com/egzosn/pay/demo/controller/PayoneerPayController.java

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020

2121
/**
2222
* @author egan
23-
* @email egzosn@gmail.com
24-
* @date 2018/2/5
23+
* email egzosn@gmail.com
24+
* date 2018/2/5
2525
*/
2626
@RestController
2727
@RequestMapping("payoneer")
@@ -63,8 +63,8 @@ public void init() {
6363

6464
/**
6565
* 获取授权页面
66-
* @param payeeId
67-
* @return
66+
* @param payeeId 用户id
67+
* @return 获取授权页面
6868
*/
6969
@RequestMapping("getAuthorizationPage.json")
7070
public Map<String ,Object> getAuthorizationPage( String payeeId ){
@@ -78,7 +78,7 @@ public void init() {
7878
/**
7979
* 获取授权用户信息,包含用户状态,注册时间,联系人信息,地址信息等等
8080
* @param payeeId 用户id
81-
* @return
81+
* @return 获取授权用户信息
8282
*/
8383
@RequestMapping("getAuthorizationUser.json")
8484
public Map<String ,Object> getAuthorizationUser( String payeeId ){
@@ -98,7 +98,7 @@ public void init() {
9898
*/
9999
@ResponseBody
100100
@RequestMapping(value = "microPay.json")
101-
public Map<String, Object> microPay(BigDecimal price, String userId) throws IOException {
101+
public Map<String, Object> microPay(BigDecimal price, String userId){
102102

103103
PayOrder order = new PayOrder("Order_payment:", "Order payment", price, UUID.randomUUID().toString().replace("-", ""), PayoneerTransactionType.CHARGE);
104104
//币种
@@ -120,9 +120,10 @@ public Map<String, Object> microPay(BigDecimal price, String userId) throws IOEx
120120
/**
121121
* 用户授权回调地址
122122
*
123-
* @param request
123+
* @param request 请求
124124
*
125-
* @return
125+
* @return 是否成功
126+
* @throws IOException IOException
126127
*/
127128
@RequestMapping(value = "payBack.json")
128129
public String payBack(HttpServletRequest request) throws IOException {

0 commit comments

Comments
 (0)