第三方api接口
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

26 rindas
943 B

  1. package yunyangwl_express
  2. import (
  3. zhios_third_party_utils "code.fnuoos.com/go_rely_warehouse/zyos_go_third_party_api.git/utils"
  4. "fmt"
  5. "github.com/syyongx/php2go"
  6. "time"
  7. )
  8. //https://open.yunyangwl.com/#/developmentDocumentation
  9. func Send(method, appid, secretKey string, params map[string]interface{}) (string, error) {
  10. timeStamp := zhios_third_party_utils.Int64ToStr(time.Now().Unix() * 1000)
  11. requestId := zhios_third_party_utils.UUIDString()
  12. params["timeStamp"] = timeStamp
  13. params["requestId"] = requestId
  14. params["appid"] = appid
  15. params["sign"] = php2go.Md5(appid + requestId + timeStamp + secretKey)
  16. params["serviceCode"] = method
  17. //url := "https://api.yunyangwl.com/api/sandbox/openService"
  18. url := "https://api.yunyangwl.com/api/wuliu/openService"
  19. post, err := zhios_third_party_utils.CurlPost(url, zhios_third_party_utils.SerializeStr(params), nil)
  20. fmt.Println(string(post))
  21. fmt.Println(err)
  22. return string(post), err
  23. }