支付宝签名修改
This commit is contained in:
@@ -41,6 +41,17 @@ func (a *API) SystemAuthToken(grantType, code, refreshToken string) (tokenInfo *
|
|||||||
if refreshToken != "" {
|
if refreshToken != "" {
|
||||||
params["refresh_token"] = refreshToken
|
params["refresh_token"] = refreshToken
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取证书
|
||||||
|
appCertSN, aliPayRootCertSN, aliPayPublicCertSN, err := SetCertSnByPath(appCertPath, aliPayRootCertPath, AliPayPublicCertPath)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
params["app_cert_sn"] = appCertSN
|
||||||
|
params["alipay_public_cert_sn"] = aliPayPublicCertSN
|
||||||
|
params["alipay_root_cert_sn"] = aliPayRootCertSN
|
||||||
|
|
||||||
retVal, err := a.AccessAPI("alipay.system.oauth.token", params, nil, false)
|
retVal, err := a.AccessAPI("alipay.system.oauth.token", params, nil, false)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
err = utils.Map2StructByJson(retVal, &tokenInfo, false)
|
err = utils.Map2StructByJson(retVal, &tokenInfo, false)
|
||||||
|
|||||||
Reference in New Issue
Block a user