From 32c0b85a4d797269dfef116c13108b2f8ca5129e Mon Sep 17 00:00:00 2001 From: Hank Shen Date: Wed, 14 Apr 2021 18:28:04 +0800 Subject: [PATCH] fix --- config/account.go | 2 +- driver/wechat/wechat.go | 2 +- go.mod | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/config/account.go b/config/account.go index 57d005c..85f112a 100644 --- a/config/account.go +++ b/config/account.go @@ -55,7 +55,7 @@ func (c *Account) FromStore(v echo.Store) *Account { tmp[currency] = struct{}{} } } - options := v.Store(`options`) + options := v.GetStore(`options`) c.Options.IconClass = options.String(`iconClass`) c.Options.IconImage = options.String(`iconImage`) c.Options.Title = options.String(`title`) diff --git a/driver/wechat/wechat.go b/driver/wechat/wechat.go index ca4d4dc..66e57ea 100644 --- a/driver/wechat/wechat.go +++ b/driver/wechat/wechat.go @@ -86,7 +86,7 @@ func (a *Wechat) Pay(ctx echo.Context, cfg *config.Pay) (*config.PayResponse, er wxParams[`time_expire`] = cfg.ExpiredAt.Format(`20060102150405`) } if cfg.Options != nil { - params := cfg.Options.Store(`params`) + params := cfg.Options.GetStore(`params`) for k := range params { wxParams[k] = params.String(k) } diff --git a/go.mod b/go.mod index 0879c22..16a0f15 100644 --- a/go.mod +++ b/go.mod @@ -10,6 +10,7 @@ require ( github.com/admpub/humanize v0.0.0-20190501023926-5f826e92c8ca // indirect github.com/admpub/log v0.0.1 github.com/admpub/mugglepay v0.0.7 + github.com/goccy/go-json v0.4.11 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/objcoding/wxpay v1.0.6 github.com/qingwg/payjs v0.0.0-20190928033402-c53dbe16b371 @@ -18,7 +19,7 @@ require ( github.com/webx-top/captcha v0.0.0-20161202061115-29e9e7f30aa0 // indirect github.com/webx-top/codec v0.0.0-20200914105801-3782d81a0302 github.com/webx-top/com v0.0.7 - github.com/webx-top/echo v2.7.9+incompatible + github.com/webx-top/echo v2.9.0+incompatible github.com/webx-top/tagfast v0.0.0-20161020041435-9a2065ce3dd2 // indirect github.com/webx-top/validation v0.0.1 // indirect )