You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
441 B
28 lines
441 B
3 years ago
|
package wechatpayapiv3
|
||
|
|
||
|
// Params 请求参数
|
||
|
type Params map[string]interface{}
|
||
|
|
||
|
func NewParams() Params {
|
||
|
p := make(Params)
|
||
|
return p
|
||
|
}
|
||
|
|
||
|
func (app *App) NewParamsWith(params ...Params) Params {
|
||
|
p := make(Params)
|
||
|
for _, v := range params {
|
||
|
p.SetParams(v)
|
||
|
}
|
||
|
return p
|
||
|
}
|
||
|
|
||
2 years ago
|
func (p Params) Set(key string, value any) {
|
||
3 years ago
|
p[key] = value
|
||
|
}
|
||
|
|
||
|
func (p Params) SetParams(params Params) {
|
||
|
for key, value := range params {
|
||
|
p[key] = value
|
||
|
}
|
||
|
}
|