Closed xianjieee closed 1 year ago
t.Run("", func(t *testing.T) { p := alipay.NewPayload("ant.merchant.expand.indirect.image.upload") p.AddFile("image_content", "8466221.png", "8466221.png") p.AddParam("image_type", "jpg") p.Verify = false
client, err := alipay.New(aId, g, true) if err != nil { log.Fatal("New err:", err) } var result = make(map[string]interface{}) err = client.Request(p, &result) if err != nil { log.Fatal("Request err:", err) } fmt.Println("result:", result) })
目前只支持上传本地文件
https://github.com/smartwalle/alipay#%E6%96%87%E4%BB%B6%E4%B8%8A%E4%BC%A0
t.Run("", func(t *testing.T) { p := alipay.NewPayload("ant.merchant.expand.indirect.image.upload") p.AddFile("image_content", "8466221.png", "8466221.png") p.AddParam("image_type", "jpg") p.Verify = false