支付宝公钥方式修改

This commit is contained in:
richboo111
2022-08-17 11:16:15 +08:00
parent 3f4600c238
commit 811e2d862f

View File

@@ -5,8 +5,11 @@ import (
)
const (
GrantTypeCode = "authorization_code"
GrantTypeRefresh = "refresh_token"
GrantTypeCode = "authorization_code"
AliPayPublicCertPath2 = "./conf/alipayCertPublicKey_RSA2.crt" // 支付宝公钥证书文件路径
AliPayRootCertPath2 = "./conf/alipayRootCert.crt" // 支付宝根证书文件路径
AppCertPath2 = "./conf/appCertPublicKey_2019110769024042.crt" // 应用公钥证书路径
GrantTypeRefresh = "refresh_token"
)
type TokenInfo struct {
@@ -44,7 +47,7 @@ func (a *API) SystemAuthToken(grantType, code, refreshToken string) (tokenInfo *
params["refresh_token"] = refreshToken
}
// 获取证书
appCertSN, aliPayRootCertSN, aliPayPublicCertSN, err := SetCertSnByPath(AppCertPath, AliPayRootCertPath, AliPayPublicCertPath)
appCertSN, aliPayRootCertSN, aliPayPublicCertSN, err := SetCertSnByPath(AppCertPath2, AliPayRootCertPath2, AliPayPublicCertPath2)
if err != nil {
return nil, err
}