1
This commit is contained in:
@@ -49,7 +49,7 @@ func New(appID, serialNo, sM4Key, clientId, clientSecret, incomingToken, changeT
|
||||
|
||||
// AccessAPI form表单格式
|
||||
func (a *API) AccessAPI(baseUrl, action, method string, pathParam string, bizParams map[string]interface{}) (retVal map[string]interface{}, err error) {
|
||||
if method != TokenActive {
|
||||
if action != TokenActive {
|
||||
a.CheckToken()
|
||||
}
|
||||
err = platformapi.AccessPlatformAPIWithRetry(a.client,
|
||||
@@ -104,7 +104,9 @@ func (a *API) AccessAPI(baseUrl, action, method string, pathParam string, bizPar
|
||||
|
||||
// AccessAPI2 json格式
|
||||
func (a *API) AccessAPI2(baseUrl, action, method string, pathParam string, bizParams map[string]interface{}) (retVal map[string]interface{}, err error) {
|
||||
a.CheckToken()
|
||||
if action != TokenActive {
|
||||
a.CheckToken()
|
||||
}
|
||||
err = platformapi.AccessPlatformAPIWithRetry(a.client,
|
||||
func() *http.Request {
|
||||
var request *http.Request
|
||||
@@ -159,7 +161,9 @@ func (a *API) AccessAPI2(baseUrl, action, method string, pathParam string, bizPa
|
||||
|
||||
// AccessAPISign 支付相关需要签名
|
||||
func (a *API) AccessAPISign(baseUrl, action, method string, pathParam string, bizParams map[string]interface{}) (retVal map[string]interface{}, err error) {
|
||||
a.CheckToken()
|
||||
if action != TokenActive {
|
||||
a.CheckToken()
|
||||
}
|
||||
Authorization, err := a.signParamRSA(bizParams, LaKaLaPrivateKey)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user