修改多商户支付
This commit is contained in:
@ -16,11 +16,11 @@ public class wxPayConfig {
|
||||
* @param platformCertificatePath
|
||||
* @return
|
||||
*/
|
||||
public static String getPublicKeyByCertificat(String platformCertificatePath)
|
||||
public static String getPublicKeyByCertificat(String platformCertificateContent)
|
||||
{
|
||||
try {
|
||||
// 读取私钥文件内容
|
||||
String platformCertificateContent = readFile(platformCertificatePath);
|
||||
//String platformCertificateContent = readFile(platformCertificatePath);
|
||||
// 去除私钥文件中的头尾信息
|
||||
platformCertificateContent = platformCertificateContent.replace("-----BEGIN CERTIFICATE-----", "")
|
||||
.replace("-----END CERTIFICATE-----", "")
|
||||
@ -37,10 +37,10 @@ public class wxPayConfig {
|
||||
}
|
||||
|
||||
// 获取微信支付公钥
|
||||
public static String getPublicKey(String publicKeyPath) {
|
||||
public static String getPublicKey(String publicKeyContent) {
|
||||
try {
|
||||
// 读取私钥文件内容
|
||||
String publicKeyContent = readFile(publicKeyPath);
|
||||
//String publicKeyContent = readFile(publicKeyPath);
|
||||
// 去除私钥文件中的头尾信息
|
||||
publicKeyContent = publicKeyContent.replace("-----BEGIN PUBLIC KEY-----", "")
|
||||
.replace("-----END PUBLIC KEY-----", "")
|
||||
@ -53,10 +53,10 @@ public class wxPayConfig {
|
||||
}
|
||||
|
||||
// 获取商户私钥
|
||||
public static PrivateKey getPrivateKey(String privateKeyPath) {
|
||||
public static PrivateKey getPrivateKey(String privateKeyContent) {
|
||||
try {
|
||||
// 读取私钥文件内容
|
||||
String privateKeyContent = readFile(privateKeyPath);
|
||||
//String privateKeyContent = readFile(privateKeyPath);
|
||||
// 去除私钥文件中的头尾信息
|
||||
privateKeyContent = privateKeyContent.replace("-----BEGIN PRIVATE KEY-----", "")
|
||||
.replace("-----END PRIVATE KEY-----", "")
|
||||
|
Reference in New Issue
Block a user