File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
src/test/java/com/wechat/pay/contrib/apache/httpclient Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -30,10 +30,10 @@ public class RsaCryptoTest {
3030
3131 private static final String mchId = "" ; // 商户号
3232 private static final String mchSerialNo = "" ; // 商户证书序列号
33- private static final String apiV3Key = "" ; // api密钥
34- // 你的商户私钥
33+ private static final String apiV3Key = "" ; // API V3密钥
3534 private static final String privateKey = "-----BEGIN PRIVATE KEY-----\n "
36- + "-----END PRIVATE KEY-----\n " ;
35+ + "-----END PRIVATE KEY-----\n " ; // 商户API V3私钥
36+ private static final String wechatPaySerial = "" ; // 平台证书序列号
3737
3838 private CloseableHttpClient httpClient ;
3939 private AutoUpdateCertificatesVerifier verifier ;
@@ -86,7 +86,7 @@ public void postEncryptDataTest() throws Exception {
8686 StringEntity reqEntity = new StringEntity (data , APPLICATION_JSON );
8787 httpPost .setEntity (reqEntity );
8888 httpPost .addHeader (ACCEPT , APPLICATION_JSON .getMimeType ());
89- httpPost .addHeader (WECHAT_PAY_SERIAL , "5157F09EFDC096DE15EBE81A47057A7232F1B8E1" );
89+ httpPost .addHeader (WECHAT_PAY_SERIAL , wechatPaySerial );
9090
9191 CloseableHttpResponse response = httpClient .execute (httpPost );
9292 assertTrue (response .getStatusLine ().getStatusCode () != SC_UNAUTHORIZED );
You can’t perform that action at this time.
0 commit comments