File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/impl Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 9
9
import com .google .gson .GsonBuilder ;
10
10
import lombok .RequiredArgsConstructor ;
11
11
12
+ import java .security .cert .X509Certificate ;
13
+ import java .util .List ;
14
+
12
15
/**
13
16
* 商家转账到零钱
14
17
*
@@ -24,7 +27,11 @@ public class TransferServiceImpl implements TransferService {
24
27
@ Override
25
28
public TransferBatchesResult transferBatches (TransferBatchesRequest request ) throws WxPayException {
26
29
String url = String .format ("%s/v3/transfer/batches" , this .payService .getPayBaseUrl ());
27
- RsaCryptoUtil .encryptFields (request , this .payService .getConfig ().getVerifier ().getValidCertificate ());
30
+ List <TransferBatchesRequest .TransferDetail > transferDetailList = request .getTransferDetailList ();
31
+ X509Certificate validCertificate = this .payService .getConfig ().getVerifier ().getValidCertificate ();
32
+ for (TransferBatchesRequest .TransferDetail detail : transferDetailList ) {
33
+ RsaCryptoUtil .encryptFields (detail , validCertificate );
34
+ }
28
35
String result = this .payService .postV3WithWechatpaySerial (url , GSON .toJson (request ));
29
36
return GSON .fromJson (result , TransferBatchesResult .class );
30
37
}
You can’t perform that action at this time.
0 commit comments