Merge pull request #725 from rocboss/dependabot/go_modules/dev/github.com/smartwalle/alipay/v3-3.2.29

mod: bump github.com/smartwalle/alipay/v3 from 3.2.20 to 3.2.29
pull/731/head
ROC 2 months ago committed by GitHub
commit abf40a409f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -36,7 +36,7 @@ require (
github.com/redis/rueidis v1.0.64
github.com/robfig/cron/v3 v3.0.1
github.com/sirupsen/logrus v1.9.3
github.com/smartwalle/alipay/v3 v3.2.20
github.com/smartwalle/alipay/v3 v3.2.29
github.com/sourcegraph/conc v0.3.0
github.com/spf13/cobra v1.9.1
github.com/spf13/viper v1.20.1
@ -145,7 +145,7 @@ require (
github.com/rs/xid v1.6.0 // indirect
github.com/sagikazarmark/locafero v0.7.0 // indirect
github.com/smartwalle/ncrypto v1.0.4 // indirect
github.com/smartwalle/ngx v1.0.9 // indirect
github.com/smartwalle/ngx v1.1.0 // indirect
github.com/smartwalle/nsign v1.0.9 // indirect
github.com/spf13/afero v1.12.0 // indirect
github.com/spf13/cast v1.7.1 // indirect

@ -297,12 +297,12 @@ github.com/sagikazarmark/locafero v0.7.0 h1:5MqpDsTGNDhY8sGp0Aowyf0qKsPrhewaLSsF
github.com/sagikazarmark/locafero v0.7.0/go.mod h1:2za3Cg5rMaTMoG/2Ulr9AwtFaIppKXTRYnozin4aB5k=
github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ=
github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
github.com/smartwalle/alipay/v3 v3.2.20 h1:IjpG3YYgUgzCfS0z/EHlUbbr0OlrmOBHUst/3FzToYE=
github.com/smartwalle/alipay/v3 v3.2.20/go.mod h1:KWg91KsY+eIOf26ZfZeH7bed1bWulGpGrL1ErHF3jWo=
github.com/smartwalle/alipay/v3 v3.2.29 h1:roGFqlml8hDa//0TpFmlyxZhndTYs7rbYLu/HlNFNJo=
github.com/smartwalle/alipay/v3 v3.2.29/go.mod h1:XarBLuAkwK3ah7mYjVtghRu+ysxzlex9sRkgqNMzMRU=
github.com/smartwalle/ncrypto v1.0.4 h1:P2rqQxDepJwgeO5ShoC+wGcK2wNJDmcdBOWAksuIgx8=
github.com/smartwalle/ncrypto v1.0.4/go.mod h1:Dwlp6sfeNaPMnOxMNayMTacvC5JGEVln3CVdiVDgbBk=
github.com/smartwalle/ngx v1.0.9 h1:pUXDvWRZJIHVrCKA1uZ15YwNti+5P4GuJGbpJ4WvpMw=
github.com/smartwalle/ngx v1.0.9/go.mod h1:mx/nz2Pk5j+RBs7t6u6k22MPiBG/8CtOMpCnALIG8Y0=
github.com/smartwalle/ngx v1.1.0 h1:q8nANgWSPRGeI/u+ixBoA4mf68DrUq6vZ+n9L5UKv9I=
github.com/smartwalle/ngx v1.1.0/go.mod h1:mx/nz2Pk5j+RBs7t6u6k22MPiBG/8CtOMpCnALIG8Y0=
github.com/smartwalle/nsign v1.0.9 h1:8poAgG7zBd8HkZy9RQDwasC6XZvJpDGQWSjzL2FZL6E=
github.com/smartwalle/nsign v1.0.9/go.mod h1:eY6I4CJlyNdVMP+t6z1H6Jpd4m5/V+8xi44ufSTxXgc=
github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo=

@ -27,8 +27,9 @@ type UserWalletBillsResp base.PageResp
type UserRechargeLinkReq struct {
BaseInfo `json:"-" form:"-" binding:"-"`
Host string `json:"-" form:"-" binding:"-"`
Amount int64 `json:"amount" form:"amount" binding:"required"`
Ctx context.Context `json:"-" form:"-" binding:"-"`
Host string `json:"-" form:"-" binding:"-"`
Amount int64 `json:"amount" form:"amount" binding:"required"`
}
type UserRechargeLinkResp struct {
@ -82,6 +83,7 @@ func (r *UserWalletBillsReq) Bind(c *gin.Context) error {
func (r *UserRechargeLinkReq) Bind(c *gin.Context) error {
r.Host = c.Request.Host
r.Ctx = c.Request.Context()
return bindAny(c, r)
}

@ -80,7 +80,7 @@ func (s *alipayPrivSrv) UserRechargeLink(req *web.UserRechargeLinkReq) (*web.Use
p.Subject = "PaoPao用户钱包充值"
p.TotalAmount = fmt.Sprintf("%.2f", float64(recharge.Amount)/100.0)
p.NotifyURL = "https://" + req.Host + "/v1/alipay/notify"
rsp, err := s.alipayClient.TradePreCreate(p)
rsp, err := s.alipayClient.TradePreCreate(req.Ctx, p)
if err != nil {
logrus.Errorf("client.TradePreCreate err: %v\n", err)
return nil, web.ErrRechargeReqFail

Loading…
Cancel
Save