mirror of
https://gitee.com/egzosn/pay-java-parent.git
synced 2026-05-07 19:46:15 +08:00
帮助文档,新增证书设置方式教程
This commit is contained in:
@@ -75,6 +75,8 @@ public class WxPayController {
|
||||
|
||||
//ssl 退款证书相关 不使用可注释
|
||||
if(!"ssl 退款证书".equals(KEYSTORE)){
|
||||
//TODO 这里也支持输入流的入参。
|
||||
// httpConfigStorage.setKeystore(WxPayController.class.getResourceAsStream("/证书文件"));
|
||||
httpConfigStorage.setKeystore(KEYSTORE);
|
||||
httpConfigStorage.setStorePassword(STORE_PASSWORD);
|
||||
httpConfigStorage.setPath(true);
|
||||
|
||||
@@ -96,8 +96,11 @@ public enum PayType implements BasePayType {
|
||||
wxPayConfigStorage.setMsgType(apyAccount.getMsgType());
|
||||
wxPayConfigStorage.setInputCharset(apyAccount.getInputCharset());
|
||||
wxPayConfigStorage.setTest(apyAccount.isTest());
|
||||
|
||||
//https证书设置 方式一
|
||||
/* HttpConfigStorage httpConfigStorage = new HttpConfigStorage();
|
||||
//TODO 这里也支持输入流的入参。
|
||||
// httpConfigStorage.setKeystore(PayType.class.getResourceAsStream("/证书文件"));
|
||||
httpConfigStorage.setKeystore("证书信息串");
|
||||
httpConfigStorage.setStorePassword("证书密码");
|
||||
//是否为证书地址
|
||||
|
||||
@@ -37,6 +37,8 @@
|
||||
//退款使用
|
||||
/* 网络请求ssl证书 根据需求进行设置**/
|
||||
//设置ssl证书路径
|
||||
//TODO 这里也支持输入流的入参。
|
||||
// httpConfigStorage.setKeystore(this.getClass()..getResourceAsStream("/证书文件"));
|
||||
httpConfigStorage.setKeystorePath("证书绝对路径");
|
||||
//设置ssl证书对应的密码
|
||||
httpConfigStorage.setStorePassword("证书对应的密码");
|
||||
|
||||
Reference in New Issue
Block a user