forked from smartwalle/alipay
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuser.go
31 lines (26 loc) · 1.01 KB
/
user.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package alipay
import (
"net/url"
)
// AgreementPageSign 支付宝个人协议页面签约接口 https://docs.open.alipay.com/api_2/alipay.user.agreement.page.sign
func (this *Client) AgreementPageSign(param AgreementPageSign) (result *url.URL, err error) {
p, err := this.URLValues(param)
if err != nil {
return nil, err
}
result, err = url.Parse(this.apiDomain + "?" + p.Encode())
if err != nil {
return nil, err
}
return result, err
}
// AgreementQuery 支付宝个人代扣协议查询接口 https://docs.open.alipay.com/api_2/alipay.user.agreement.query
func (this *Client) AgreementQuery(param AgreementQuery) (result *AgreementQueryRsp, err error) {
err = this.DoRequest("POST", param, &result)
return result, err
}
// AgreementUnsign 支付宝个人代扣协议解约接口 https://docs.open.alipay.com/api_2/alipay.user.agreement.unsign
func (this *Client) AgreementUnsign(param AgreementUnsign) (result *AgreementUnsignRsp, err error) {
err = this.DoRequest("POST", param, &result)
return result, err
}