File tree Expand file tree Collapse file tree 7 files changed +24
-12
lines changed
main/java/com/github/binarywang/wxpay
test/java/com/github/binarywang/wxpay/service/impl Expand file tree Collapse file tree 7 files changed +24
-12
lines changed Original file line number Diff line number Diff line change 14
14
*/
15
15
@ Data
16
16
@ NoArgsConstructor
17
- public class MerchantWithdrawRequest implements Serializable {
17
+ public class SpWithdrawRequest implements Serializable {
18
18
/**
19
19
* <pre>
20
20
* 字段名:商户提现单号
Original file line number Diff line number Diff line change 14
14
*/
15
15
@ Data
16
16
@ NoArgsConstructor
17
- public class MerchantWithdrawResult implements Serializable {
17
+ public class SpWithdrawResult implements Serializable {
18
18
19
19
/**
20
20
* <pre>
Original file line number Diff line number Diff line change 14
14
*/
15
15
@ Data
16
16
@ NoArgsConstructor
17
- public class EcommerceWithdrawRequest implements Serializab
10000
le {
17
+ public class SubWithdrawRequest implements Serializable {
18
18
19
19
/**
20
20
* <pre>
Original file line number Diff line number Diff line change 14
14
*/
15
15
@ Data
16
16
@ NoArgsConstructor
17
- public class EcommerceWithdrawResult implements Serializable {
17
+ public class SubWithdrawResult implements Serializable {
18
18
19
19
/**
20
20
* <pre>
Original file line number Diff line number Diff line change @@ -271,7 +271,7 @@ public interface EcommerceService {
271
271
* @return 返回数据 return withdraw result
272
272
* @throws WxPayException the wx pay exception
273
273
*/
274
- EcommerceWithdrawResult withdraw ( EcommerceWithdrawRequest request ) throws WxPayException ;
274
+ SubWithdrawResult subWithdraw ( SubWithdrawRequest request ) throws WxPayException ;
275
275
276
276
/**
277
277
* <pre>
@@ -283,5 +283,5 @@ public interface EcommerceService {
283
283
* @return 返回数据 return withdraw result
284
284
* @throws WxPayException the wx pay exception
285
285
*/
286
- MerchantWithdrawResult withdraw ( MerchantWithdrawRequest request ) throws WxPayException ;
286
+ SpWithdrawResult spWithdraw ( SpWithdrawRequest request ) throws WxPayException ;
287
287
}
Original file line number Diff line number Diff line change @@ -203,17 +203,17 @@ public RefundsResult refunds(RefundsRequest request) throws WxPayException {
203
203
}
204
204
205
205
@ Override
206
- public EcommerceWithdrawResult withdraw ( EcommerceWithdrawRequest request ) throws WxPayException {
206
+ public SubWithdrawResult subWithdraw ( SubWithdrawRequest request ) throws WxPayException {
207
207
String url = String .format ("%s/v3/ecommerce/fund/withdraw" , this .payService .getPayBaseUrl ());
208
208
String response = this .payService .postV3 (url , GSON .toJson (request ));
209
- return GSON .fromJson (response , EcommerceWithdrawResult .class );
209
+ return GSON .fromJson (response , SubWithdrawResult .class );
210
210
}
211
211
212
212
@ Override
213
- public MerchantWithdrawResult withdraw ( MerchantWithdrawRequest request ) throws WxPayException {
213
+ public SpWithdrawResult spWithdraw ( SpWithdrawRequest request ) throws WxPayException {
214
214
String url = String .format ("%s/v3/merchant/fund/withdraw" , this .payService .getPayBaseUrl ());
215
215
String response = this .payService .postV3 (url , GSON .toJson (request ));
216
- return GSON .fromJson (response , MerchantWithdrawResult .class );
216
+ return GSON .fromJson (response , SpWithdrawResult .class );
217
217
}
218
218
219
219
/**
Original file line number Diff line number Diff line change @@ -59,8 +59,20 @@ public void testQueryPartnerTransactions() throws WxPayException {
59
59
//商户订单号
60
60
request .setOutTradeNo ("" );
61
61
//微信订单号
62
- request .setTransactionId ("4200000703202009180239466769" );
63
- PartnerTransactionsResult result = wxPayService .getEcommerceService ().queryPartnerTransactions (request );
62
+ request .setTransactionId ("" );
63
+ wxPayService .getEcommerceService ().queryPartnerTransactions (request );
64
+ }
64
65
66
+ @ Test
67
+ public void testSubNowBalance () throws WxPayException {
68
+ String subMchid = "" ;
69
+ wxPayService .getEcommerceService ().subNowBalance (subMchid );
70
+ }
71
+
72
+ @ Test
73
+ public void testSubDayEndBalance () throws WxPayException {
74
+ String subMchid = "" ;
75
+ String date = "" ;
76
+ wxPayService .getEcommerceService ().subDayEndBalance (subMchid ,date );
65
77
}
66
78
}
You can’t perform that action at this time.
0 commit comments