修复支付问题

fix/release
mofangmin 1 year ago
parent 203a4e9d49
commit 96b7aef02c
  1. 3
      modules/pay/base/signmd5.go
  2. 2
      modules/pay/gopay/base.go
  3. 1
      modules/pay/gopay/values.go
  4. 3
      modules/pay/mlpay/base.go

@ -3,6 +3,8 @@ package base
import (
"server/util"
"strings"
"github.com/liangdas/mqant/log"
)
func (b *Base) SignMD5(send interface{}) string {
@ -16,5 +18,6 @@ func (b *Base) SignMD5(send interface{}) string {
if b.ShouldSignUpper {
ret = strings.ToUpper(ret)
}
log.Info("SignStr:%v,SignMD5:%v", signStr, ret)
return ret
}

@ -114,7 +114,7 @@ func (s *Sub) PackWithdrawReq() interface{} {
func (s *Sub) CheckSign(str string) bool {
// str += "&key=" + key
checkSign := ""
s.Base.CallbackResp.Msg = "success"
s.Base.CallbackResp.Msg = "SUCCESS"
mySign := ""
if s.Base.Opt == 3 {
req := s.Base.CallbackReq.(*PayCallbackReq)

@ -87,5 +87,6 @@ type WithdrawCallbackReq struct {
Fee string `json:"fee"` // 手续费
Currency string `json:"currency"` // 货币类型
Sign string `json:"sign"` // 签名值,详情见1 签名说明
Utr string `json:"utr"`
} `json:"data"` // 数据字段
}

@ -88,6 +88,9 @@ func (s *Sub) GetResp() (proto.Message, error) {
func (s *Sub) PackPayReq() interface{} {
r := s.Base.PayReq
if len(r.Phone) == 12 {
r.Phone = r.Phone[2:]
}
userDataStr, _ := json.Marshal(UserData{UserName: r.Name, UserEmail: r.Email, UserPhone: r.Phone})
send := &PayReq{
PartnerID: PartnerId,

Loading…
Cancel
Save