修改测试文件
This commit is contained in:
@@ -51,7 +51,7 @@ func New(appID, appSecret, merchantId, code string, config ...*platformapi.APICo
|
||||
appID: appID,
|
||||
merchantId: merchantId,
|
||||
signature: "",
|
||||
timestamp: time.Now().UnixNano(),
|
||||
timestamp: time.Now().Unix() * 1000,
|
||||
accessToken: "",
|
||||
version: "1.0",
|
||||
appSecret: appSecret,
|
||||
@@ -78,8 +78,9 @@ func (a *API) signParam(params map[string]interface{}) (sig string) {
|
||||
}
|
||||
|
||||
func (a *API) AccessAPI(baseUrl, actionApi, method string, bizParams map[string]interface{}) (retVal map[string]interface{}, err error) {
|
||||
a.signature = a.signParam(bizParams)
|
||||
bizParams["signature"] = a.signature
|
||||
if a.signature == "" {
|
||||
a.signature = a.signParam(bizParams)
|
||||
}
|
||||
// 序列化
|
||||
data, err := json.Marshal(bizParams)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user