@ -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,