diff --git a/conf/config.yaml b/conf/config.yaml index b817052..e986509 100644 --- a/conf/config.yaml +++ b/conf/config.yaml @@ -25,5 +25,5 @@ zking: app-secret: "" suixing: base-url: "https://test-open.zking.com" - app-id: "" - app-secret: "" \ No newline at end of file + app-id: "2024060132098212" + app-secret: "N1xsd0sPxoWxUYb6" \ No newline at end of file diff --git a/third_party/suixing/api.go b/third_party/suixing/api.go index 15a8081..43f066a 100644 --- a/third_party/suixing/api.go +++ b/third_party/suixing/api.go @@ -37,12 +37,12 @@ func (api *suixingApi) CreateOrderCallback(param CommonParam) (*Result, error) { func (api *suixingApi) Sign(param *CommonParam) error { //vals, err := utils.StructToURLValues(param) vals := url.Values{} - vals.Set("appid", param.AppID) + vals.Set("appid", global.Config.Suixing.AppID) vals.Set("requestid", param.RequestID) vals.Set("timestamp", param.Timestamp) vals.Set("version", param.Version) vals.Set("data", utils.Md5(param.Data)) - vals.Set("appsecret", "aaaaaa") + vals.Set("appsecret", global.Config.Suixing.AppSecret) fmt.Println(vals.Encode()) param.Sign = utils.Sha1(vals.Encode()) return nil