forked from smartwalle/alipay
-
Notifications
You must be signed in to change notification settings - Fork 0
/
wap_type.go
36 lines (30 loc) · 932 Bytes
/
wap_type.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
35
36
package alipay
import (
"encoding/json"
)
// https://docs.open.alipay.com/api_1/alipay.trade.wap.pay/
type AliPayTradeWapPay struct {
TradePay
QuitURL string `json:"quit_url,omitempty"`
AuthToken string `json:"auth_token,omitempty"` // 针对用户授权接口,获取用户相关数据时,用于标识用户授权关系
TimeExpire string `json:"time_expire,omitempty"` // 绝对超时时间,格式为yyyy-MM-dd HH:mm。
}
func (this AliPayTradeWapPay) APIName() string {
return "alipay.trade.wap.pay"
}
func (this AliPayTradeWapPay) Params() map[string]string {
var m = make(map[string]string)
m["notify_url"] = this.NotifyURL
m["return_url"] = this.ReturnURL
return m
}
func (this AliPayTradeWapPay) ExtJSONParamName() string {
return "biz_content"
}
func (this AliPayTradeWapPay) ExtJSONParamValue() string {
var bytes, err = json.Marshal(this)
if err != nil {
return ""
}
return string(bytes)
}