|
|
@ -37,12 +37,12 @@ func (api *suixingApi) CreateOrderCallback(param CommonParam) (*Result, error) {
|
|
|
|
func (api *suixingApi) Sign(param *CommonParam) error {
|
|
|
|
func (api *suixingApi) Sign(param *CommonParam) error {
|
|
|
|
//vals, err := utils.StructToURLValues(param)
|
|
|
|
//vals, err := utils.StructToURLValues(param)
|
|
|
|
vals := url.Values{}
|
|
|
|
vals := url.Values{}
|
|
|
|
vals.Set("appid", param.AppID)
|
|
|
|
vals.Set("appid", global.Config.Suixing.AppID)
|
|
|
|
vals.Set("requestid", param.RequestID)
|
|
|
|
vals.Set("requestid", param.RequestID)
|
|
|
|
vals.Set("timestamp", param.Timestamp)
|
|
|
|
vals.Set("timestamp", param.Timestamp)
|
|
|
|
vals.Set("version", param.Version)
|
|
|
|
vals.Set("version", param.Version)
|
|
|
|
vals.Set("data", utils.Md5(param.Data))
|
|
|
|
vals.Set("data", utils.Md5(param.Data))
|
|
|
|
vals.Set("appsecret", "aaaaaa")
|
|
|
|
vals.Set("appsecret", global.Config.Suixing.AppSecret)
|
|
|
|
fmt.Println(vals.Encode())
|
|
|
|
fmt.Println(vals.Encode())
|
|
|
|
param.Sign = utils.Sha1(vals.Encode())
|
|
|
|
param.Sign = utils.Sha1(vals.Encode())
|
|
|
|
return nil
|
|
|
|
return nil
|
|
|
|