This commit is contained in:
yc13649764453
2023-09-18 09:41:19 +08:00
parent 8d3c128f3b
commit 9ada233eb7
60 changed files with 8255 additions and 655 deletions

View File

@@ -0,0 +1,36 @@
package com;
import com.peanut.modules.pay.weChatPay.config.WechatPayConfig;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import javax.annotation.Resource;
import java.security.PrivateKey;
@SpringBootTest
public class VxApiTest {
@Resource
private WechatPayConfig wechatPayConfig;
@Test
public void textgetPrivateKey(){
//获取私钥路径
String keyPemPath = wechatPayConfig.getKeyPemPath();
//获取私钥
PrivateKey privateKey = wechatPayConfig.getPrivateKey(keyPemPath);
//输出很长的字符串 如果有问题转json试试
System.out.println(privateKey);
}
@Test
public void getWxPayConfig(){
String mchId =wechatPayConfig.getMchId();
System.out.println(mchId);
}
}