forked from smartwalle/alipay
-
Notifications
You must be signed in to change notification settings - Fork 0
/
wap.go
34 lines (27 loc) · 817 Bytes
/
wap.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
32
33
34
package alipay
import "net/url"
// TradeWapPay 手机网站支付接口 https://docs.open.alipay.com/api_1/alipay.trade.wap.pay/
func (this *Client) TradeWapPay(param TradeWapPay) (result *url.URL, err error) {
p, err := this.URLValues(param)
if err != nil {
return nil, err
}
result, err = url.Parse(this.host + "?" + p.Encode())
if err != nil {
return nil, err
}
return result, err
}
// TradeWapMergePay 无线Wap合并支付接口2.0 https://opendocs.alipay.com/open/028xra
// TODO TradeWapMergePay 接口未经测试
func (this *Client) TradeWapMergePay(param TradeWapMergePay) (result *url.URL, err error) {
p, err := this.URLValues(param)
if err != nil {
return nil, err
}
result, err = url.Parse(this.host + "?" + p.Encode())
if err != nil {
return nil, err
}
return result, err
}