pay项目微信工单异步推送地址设置接口
This commit is contained in:
		
							parent
							
								
									34b757ca09
								
							
						
					
					
						commit
						6fb06e3d4f
					
				| @ -10,12 +10,12 @@ const ( | ||||
| ) | ||||
| 
 | ||||
| var HOST requests.Host = requests.Host{ | ||||
| 	Default: "pay.uu89.com", | ||||
| 	Default: "pay.gaore.com", | ||||
| 	Func: func(s string) string { | ||||
| 		var a = map[string]string{ | ||||
| 			requests.RELEASE: "pay.uu89.com", | ||||
| 			requests.PRE:     "pay.uu89.com", | ||||
| 			requests.TEST:    "pay.uu89.com", | ||||
| 			requests.RELEASE: "pay.gaore.com", | ||||
| 			requests.PRE:     "pay.gaore.com", | ||||
| 			requests.TEST:    "pay.gaore.com", | ||||
| 		} | ||||
| 		return a[s] | ||||
| 	}, | ||||
| @ -48,3 +48,9 @@ func (c *Client) ComplaintUpload(req *ComplaintUploadRequest) (response *Complai | ||||
| 	err = c.DoAction(req, response) | ||||
| 	return | ||||
| } | ||||
| 
 | ||||
| func (c *Client) ComplaintNotifyUrl(req *ComplaintNotifyUrlRequest) (response *ComplaintNotifyUrlResponse, err error) { | ||||
| 	response = CreateComplaintNotifyUrlResponse() | ||||
| 	err = c.DoAction(req, response) | ||||
| 	return | ||||
| } | ||||
|  | ||||
| @ -13,12 +13,13 @@ func TestClient_GetUserInfo(t *testing.T) { | ||||
| 		t.Error(err) | ||||
| 	} | ||||
| 
 | ||||
| 	req := CreateComplaintUploadRequest() | ||||
| 	req := CreateComplaintNotifyUrlRequest() | ||||
| 
 | ||||
| 	req.MchId = "3503" | ||||
| 	req.ImageUrl = "https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64" | ||||
| 	req.NotifyUrl = "https://pay.uu89.com/api/complaint/wxNotify/3503" | ||||
| 	req.Type = 1 | ||||
| 
 | ||||
| 	resp, err := c.ComplaintUpload(req) | ||||
| 	resp, err := c.ComplaintNotifyUrl(req) | ||||
| 	if err != nil { | ||||
| 		log.Fatalln(err) | ||||
| 	} | ||||
|  | ||||
							
								
								
									
										35
									
								
								services/pay/complaint_notify_url.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										35
									
								
								services/pay/complaint_notify_url.go
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,35 @@ | ||||
| package pay | ||||
| 
 | ||||
| import ( | ||||
| 	"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/requests" | ||||
| 	"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/responses" | ||||
| ) | ||||
| 
 | ||||
| type ComplaintNotifyUrlRequest struct { | ||||
| 	*requests.RpcRequest | ||||
| 	MchId     string `position:"Body" field:"mch_id" default:"" ` | ||||
| 	NotifyUrl string `position:"Body" field:"notify_url" default:"" ` | ||||
| 	Type      int    `position:"Body" field:"type" default:""` | ||||
| } | ||||
| 
 | ||||
| type ComplaintNotifyUrlResponse struct { | ||||
| 	*responses.BaseResponse | ||||
| 	Code int    `json:"code"` | ||||
| 	Msg  string `json:"msg"` | ||||
| } | ||||
| 
 | ||||
| func CreateComplaintNotifyUrlRequest() (req *ComplaintNotifyUrlRequest) { | ||||
| 	req = &ComplaintNotifyUrlRequest{ | ||||
| 		RpcRequest: &requests.RpcRequest{}, | ||||
| 	} | ||||
| 	req.InitWithApiInfo(HOST, VERSION, "/api/complaint/createWxNotifyUrl") | ||||
| 	req.Method = requests.POST | ||||
| 	return | ||||
| } | ||||
| 
 | ||||
| func CreateComplaintNotifyUrlResponse() (response *ComplaintNotifyUrlResponse) { | ||||
| 	response = &ComplaintNotifyUrlResponse{ | ||||
| 		BaseResponse: &responses.BaseResponse{}, | ||||
| 	} | ||||
| 	return | ||||
| } | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user