7
7
import me .chanjar .weixin .mp .bean .result .*;
8
8
9
9
import java .text .SimpleDateFormat ;
10
- import java .util .Map ;
11
10
12
11
/**
13
12
* 微信API的Service
@@ -90,8 +89,6 @@ public interface WxMpService {
90
89
* 详情请见: http://mp.weixin.qq.com/wiki/index.php?title=高级群发接口
91
90
* </pre>
92
91
*
93
- * @param news
94
- * @throws WxErrorException
95
92
* @see #massGroupMessageSend(me.chanjar.weixin.mp.bean.WxMpMassGroupMessage)
96
93
* @see #massOpenIdsMessageSend(me.chanjar.weixin.mp.bean.WxMpMassOpenIdsMessage)
97
94
*/
@@ -134,7 +131,6 @@ public interface WxMpService {
134
131
* 详情请见: http://mp.weixin.qq.com/wiki/index.php?title=长链接转短链接接口
135
132
* </pre>
136
133
*
137
- * @param long_url
138
134
*/
139
135
String shortUrl (String long_url ) throws WxErrorException ;
140
136
@@ -144,9 +140,7 @@ public interface WxMpService {
144
140
* 详情请见: http://mp.weixin.qq.com/wiki/index.php?title=模板消息接口
145
141
* </pre>
146
142
*
147
- * @param templateMessage
148
143
* @return msgid
149
- * @throws WxErrorException
150
144
*/
151
145
String templateSend (WxMpTemplateMessage templateMessage ) throws WxErrorException ;
152
146
@@ -164,8 +158,6 @@ public interface WxMpService {
164
158
* 详情请见: http://mp.weixin.qq.com/wiki/index.php?title=网页授权获取用户基本信息
165
159
* </pre>
166
160
*
167
- * @param scope
168
- * @param state
169
161
* @return url
170
162
*/
171
163
String oauth2buildAuthorizationUrl (String scope , String state );
@@ -177,8 +169,6 @@ public interface WxMpService {
177
169
* </pre>
178
170
*
179
171
* @param redirectURI 用户授权完成后的重定向链接,无需urlencode, 方法内会进行encode
180
- * @param scope
181
- * @param state
182
172
* @return url
183
173
*/
184
174
String oauth2buildAuthorizationUrl (String redirectURI , String scope , String state );
@@ -203,7 +193,6 @@ public interface WxMpService {
203
193
* 用oauth2获取用户信息, 当前面引导授权时的scope是snsapi_userinfo的时候才可以
204
194
* </pre>
205
195
*
206
- * @param oAuth2AccessToken
207
196
* @param lang zh_CN, zh_TW, en
208
197
*/
209
198
WxMpUser oauth2getUserInfo (WxMpOAuth2AccessToken oAuth2AccessToken , String lang ) throws WxErrorException ;
@@ -213,7 +202,6 @@ public interface WxMpService {
213
202
* 验证oauth2的access token是否有效
214
203
* </pre>
215
204
*
216
- * @param oAuth2AccessToken
217
205
*/
218
206
boolean oauth2validateAccessToken (WxMpOAuth2AccessToken oAuth2AccessToken );
219
207
@@ -265,146 +253,13 @@ public interface WxMpService {
265
253
*/
266
254
void setMaxRetryTimes (int maxRetryTimes );
267
255
268
- /**
269
- * 统一下单(详见http://pay.weixin.qq.com/wiki/doc/api/jsapi.php?chapter=9_1)
270
- * 在发起微信支付前,需要调用统一下单接口,获取"预支付交易会话标识"
271
- *
272
- * @param openId 支付人openId
273
- * @param outTradeNo 商户端对应订单号
274
- * @param amt 金额(单位元)
275
- * @param body 商品描述
276
- * @param tradeType 交易类型 JSAPI,NATIVE,APP,WAP
277
- * @param ip 发起支付的客户端IP
278
- * @param notifyUrl 通知地址
279
- * @deprecated Use me.chanjar.weixin.mp.api.WxMpService.getPrepayId(Map<String, String>) instead
280
- */
281
- @ Deprecated
282
- WxMpPrepayIdResult getPrepayId (String openId , String outTradeNo , double amt , String body , String tradeType , String ip , String notifyUrl );
283
-
284
- /**
285
- * 统一下单(详见http://pay.weixin.qq.com/wiki/doc/api/jsapi.php?chapter=9_1)
286
- * 在发起微信支付前,需要调用统一下单接口,获取"预支付交易会话标识"
287
- *
288
- * @param parameters All required/optional parameters for weixin payment
289
- * @throws IllegalArgumentException
290
- */
291
- WxMpPrepayIdResult getPrepayId (Map <String , String > parameters );
292
-
293
- /**
294
- * 该接口调用“统一下单”接口,并拼装发起支付请求需要的参数
295
- * 详见http://mp.weixin.qq.com/wiki/7/aaa137b55fb2e0456bf8dd9148dd613f.html#.E5.8F.91.E8.B5.B7.E4.B8.80.E4.B8.AA.E5.BE.AE.E4.BF.A1.E6.94.AF.E4.BB.98.E8.AF.B7.E6.B1.82
296
- *
297
- * @param parameters the required or optional parameters
298
- */
299
- Map <String , String > getPayInfo (Map <String , String > parameters ) throws WxErrorException ;
300
-
301
- /**
302
- * 该接口调用“统一下单”接口,并拼装NATIVE发起支付请求需要的参数
303
- * 详见http://mp.weixin.qq.com/wiki/7/aaa137b55fb2e0456bf8dd9148dd613f.html#.E5.8F.91.E8.B5.B7.E4.B8.80.E4.B8.AA.E5.BE.AE.E4.BF.A1.E6.94.AF.E4.BB.98.E8.AF.B7.E6.B1.82
304
- * tradeType 交易类型 NATIVE (其他交易类型JSAPI,APP,WAP)
305
- *
306
- * @param productId 商户商品ID
307
- * @param outTradeNo 商户端对应订单号
308
- * @param amt 金额(单位元)
309
- * @param body 商品描述
310
- * @param ip 发起支付的客户端IP
311
- * @param notifyUrl 通知地址
312
- * @deprecated Use me.chanjar.weixin.mp.api.WxMpService.getPayInfo(Map<String, String>) instead
313
- */
314
- @ Deprecated
315
- Map <String , String > getNativePayInfo (String productId , String outTradeNo , double amt , String body , String ip , String notifyUrl ) throws WxErrorException ;
316
-
317
- /**
318
- * 该接口调用“统一下单”接口,并拼装JSAPI发起支付请求需要的参数
319
- * 详见http://mp.weixin.qq.com/wiki/7/aaa137b55fb2e0456bf8dd9148dd613f.html#.E5.8F.91.E8.B5.B7.E4.B8.80.E4.B8.AA.E5.BE.AE.E4.BF.A1.E6.94.AF.E4.BB.98.E8.AF.B7.E6.B1.82
320
- * tradeType 交易类型 JSAPI(其他交易类型NATIVE,APP,WAP)
321
- *
322
- * @param openId 支付人openId
323
- * @param outTradeNo 商户端对应订单号
324
- * @param amt 金额(单位元)
325
- * @param body 商品描述
326
- * @param ip 发起支付的客户端IP
327
- * @param notifyUrl 通知地址
328
- * @deprecated Use me.chanjar.weixin.mp.api.WxMpService.getPayInfo(Map<String, String>) instead
329
- */
330
- @ Deprecated
331
- Map <String , String > getJsapiPayInfo (String openId , String outTradeNo , double amt , String body , String ip , String notifyUrl ) throws WxErrorException ;
332
-
333
- /**
334
- * 该接口提供所有微信支付订单的查询,当支付通知处理异常戒丢失的情冴,商户可以通过该接口查询订单支付状态。
335
- * 详见http://pay.weixin.qq.com/wiki/doc/api/jsapi.php?chapter=9_2
336
- *
337
- * @param transactionId
338
- * @param outTradeNo
339
- */
340
- WxMpPayResult getJSSDKPayResult (String transactionId , String outTradeNo );
341
-
342
- /**
343
- * 读取支付结果通知
344
- * 详见http://pay.weixin.qq.com/wiki/doc/api/jsapi.php?chapter=9_7
345
- *
346
- * @param xmlData
347
- */
348
- WxMpPayCallback getJSSDKCallbackData (String xmlData );
349
-
350
- /**
351
- * 微信支付-申请退款
352
- * 详见 https://pay.weixin.qq.com/wiki/doc/api/jsapi.php?chapter=9_4
353
- *
354
- * @param parameters 需要传入的退款参数的Map。以下几项为参数的必须项:<br/>
355
- * <li/> transaction_id
356
- * <li/> out_trade_no (仅在上述transaction_id为空时是必须项)
357
- * <li/> out_refund_no
358
- * <li/> total_fee
359
- * <li/> refund_fee
360
- * @return 退款操作结果
361
- * @throws WxErrorException
362
- */
363
- WxMpPayRefundResult refundPay (Map <String , String > parameters ) throws WxErrorException ;
364
-
365
- /**
366
- * <pre>
367
- * 计算Map键值对是否和签名相符,
368
- * 按照字段名的 ASCII 码从小到大排序(字典序)后,使用 URL 键值对的 格式(即 key1=value1&key2=value2...)拼接成字符串
369
- * </pre>
370
- *
371
- * @param kvm
372
- * @param signature
373
- */
374
- boolean checkJSSDKCallbackDataSignature (Map <String , String > kvm , String signature );
375
-
376
- /**
377
- * 发送微信红包给个人用户
378
- * <p>
379
- * 需要传入的必填参数如下:
380
- * mch_billno//商户订单号
381
- * send_name//商户名称
382
- * re_openid//用户openid
383
- * total_amount//红包总额
384
- * total_num//红包发放总人数
385
- * wishing//红包祝福语
386
- * client_ip//服务器Ip地址
387
- * act_name//活动名称
388
- * remark //备注
389
- * 文档详见:https://pay.weixin.qq.com/wiki/doc/api/tools/cash_coupon.php?chapter=13_5
390
- * <p>
391
- * 使用现金红包功能需要在xml配置文件中额外设置:
392
- * <partnerId></partnerId>微信商户平台ID
393
- * <partnerKey></partnerKey>商户平台设置的API密钥
394
- *
395
- * @param parameters
396
- */
397
- WxRedpackResult sendRedpack (Map <String , String > parameters ) throws WxErrorException ;
398
-
399
256
/**
400
257
* <pre>
401
258
* 预览接口
402
259
* 详情请见:http://mp.weixin.qq.com/wiki/15/40b6865b893947b764e2de8e4a1fb55f.html#.E9.A2.84.E8.A7.88.E6.8E.A5.E5.8F.A3.E3.80.90.E8.AE.A2.E9.98.85.E5.8F.B7.E4.B8.8E.E6.9C.8D.E5.8A.A1.E5.8F.B7.E8.AE.A4.E8.AF.81.E5.90.8E.E5.9D.87.E5.8F.AF.E7.94.A8.E3.80.91
403
260
* </pre>
404
261
*
405
- * @param wxMpMassPreviewMessage
406
262
* @return wxMpMassSendResult
407
- * @throws WxErrorException
408
263
*/
409
264
WxMpMassSendResult massMessagePreview (WxMpMassPreviewMessage wxMpMassPreviewMessage ) throws Exception ;
410
265
@@ -415,9 +270,7 @@ public interface WxMpService {
415
270
* 详情请见:http://mp.weixin.qq.com/wiki/5/6dde9eaa909f83354e0094dc3ad99e05.html#.E8.AE.BE.E7.BD.AE.E6.89.80.E5.B1.9E.E8.A1.8C.E4.B8.9A
416
271
* </pre>
417
272
*
418
- * @param wxMpIndustry
419
273
* @return JsonObject
420
- * @throws WxErrorException
421
274
*/
422
275
String setIndustry (WxMpIndustry wxMpIndustry ) throws WxErrorException ;
423
276
@@ -428,7 +281,6 @@ public interface WxMpService {
428
281
* </pre>
429
282
*
430
283
* @return wxMpIndustry
431
- * @throws WxErrorException
432
284
*/
433
285
WxMpIndustry getIndustry () throws WxErrorException ;
434
286
@@ -487,4 +339,11 @@ public interface WxMpService {
487
339
* @return WxMpCardService
488
340
*/
489
341
WxMpCardService getCardService ();
342
+
343
+ /**
344
+ * 返回微信支付相关接口的方法实现类,以方便调用个其各种接口
345
+ *
346
+ * @return WxMpPayService
347
+ */
348
+ WxMpPayService getPayService ();
490
349
}
0 commit comments