Merge branch 'fix/release' into dev

# Conflicts:
#	cmd/build.sh
#	modules/pay/eanipay/base.go
dev
mofangmin 1 year ago
commit 7cbc9ae61a
  1. 1
      call/pay.go
  2. 4
      modules/pay/eanipay/base.go
  3. 8
      modules/pay/values/values.go
  4. 7
      modules/web/handler/share.go
  5. 2
      modules/web/handler/sys.go

@ -405,6 +405,7 @@ func ReturnBackWithdraw(or *common.WithdrawOrder, originStatus, status uint8, pa
} }
if status == common.StatusROrderFail { if status == common.StatusROrderFail {
status = common.StatusROrderCreate status = common.StatusROrderCreate
u["status"] = status
u["callback_time"] = 0 u["callback_time"] = 0
} }
if len(payChannel) > 0 { if len(payChannel) > 0 {

@ -102,7 +102,7 @@ func (s *Sub) PackPayReq() interface{} {
MerchantTradeNo: r.OrderID, MerchantTradeNo: r.OrderID,
Amount: fmt.Sprintf("%d", r.Amount), Amount: fmt.Sprintf("%d", r.Amount),
Currency: "INR", Currency: "INR",
Description: "TeenPatti", Description: "BW",
Payer: Payer{UserID: fmt.Sprintf("%d", r.UID), Name: r.Name, Email: r.Email, Phone: r.Phone}, Payer: Payer{UserID: fmt.Sprintf("%d", r.UID), Name: r.Name, Email: r.Email, Phone: r.Phone},
PayMethod: struct { PayMethod: struct {
Type string `json:"type"` // UPI Type string `json:"type"` // UPI
@ -123,7 +123,7 @@ func (s *Sub) PackWithdrawReq() interface{} {
MerchantTradeNo: r.OrderID, MerchantTradeNo: r.OrderID,
Amount: fmt.Sprintf("%d", r.Amount), Amount: fmt.Sprintf("%d", r.Amount),
Currency: "INR", Currency: "INR",
Description: "TeenPatti", Description: "BW",
NotifyUrl: values.GetWithdrawCallback(values.EaniPay), NotifyUrl: values.GetWithdrawCallback(values.EaniPay),
} }
if r.PayType == common.WithdrawTypeBank { if r.PayType == common.WithdrawTypeBank {

@ -238,20 +238,20 @@ func PayCallback(w PayWay) {
// 获取支付回调路径 // 获取支付回调路径
func GetPayCallback(way PayWay) string { func GetPayCallback(way PayWay) string {
return config.GetConfig().Pay.CallbackURL + config.GetConfig().Pay.Addr + "/callback/pay/" + fmt.Sprintf("%d", way) return config.GetConfig().Pay.CallbackURL + "/callback/pay/" + fmt.Sprintf("%d", way)
} }
// 获取退出回调路径 // 获取退出回调路径
func GetWithdrawCallback(way PayWay) string { func GetWithdrawCallback(way PayWay) string {
return config.GetConfig().Pay.CallbackURL + config.GetConfig().Pay.Addr + "/callback/withdraw/" + fmt.Sprintf("%d", way) return config.GetConfig().Pay.CallbackURL + "/callback/withdraw/" + fmt.Sprintf("%d", way)
} }
func GetFrontCallback() string { func GetFrontCallback() string {
return config.GetConfig().Pay.CallbackURL + config.GetConfig().Pay.Addr + "/common/front/payCallback" return config.GetConfig().Pay.CallbackURL + "/common/front/payCallback"
} }
func GetFrontCallbackFail() string { func GetFrontCallbackFail() string {
return config.GetConfig().Pay.CallbackURL + config.GetConfig().Pay.Addr + "/common/front/payCallback/fail" return config.GetConfig().Pay.CallbackURL + "/common/front/payCallback/fail"
} }
// 根据body里的字段直接拼接出签名字符串 // 根据body里的字段直接拼接出签名字符串

@ -106,7 +106,12 @@ func ShareInfo(c *gin.Context) {
resp.RechargeCount = call.GetUserShareRecharges(a.UID, 1) resp.RechargeCount = call.GetUserShareRecharges(a.UID, 1)
resp.TotalRecharge = call.GetUserShareRechargeAmount(a.UID, 1) resp.TotalRecharge = call.GetUserShareRechargeAmount(a.UID, 1)
if channel != nil { if channel != nil {
resp.ShareLink = channel.URL + "?code=" + shareInfo.Share + "&ch=" + fmt.Sprintf("%d", channel.ChannelID) num := 10000
channelId := channel.ChannelID
if channel.ChannelID < num {
channelId += num
}
resp.ShareLink = channel.URL + "?code=" + shareInfo.Share + "&ch=" + fmt.Sprintf("%d", channelId)
if a.Prefix != "" { if a.Prefix != "" {
resp.ShareLink = a.Prefix + "." + resp.ShareLink resp.ShareLink = a.Prefix + "." + resp.ShareLink
} else { } else {

@ -131,6 +131,7 @@ func Config(c *gin.Context) {
resp := &values.ConfigResp{} resp := &values.ConfigResp{}
a.Data = resp a.Data = resp
channel := call.GetChannelByID(a.Channel) channel := call.GetChannelByID(a.Channel)
log.Debug("Config channel:%v,channel:%+v", a.Channel, channel)
if channel == nil { if channel == nil {
return return
} }
@ -139,4 +140,5 @@ func Config(c *gin.Context) {
resp.FBPixelID = channel.FBPixelID resp.FBPixelID = channel.FBPixelID
// resp.FBAccessToken = channel.FBAccessToken // resp.FBAccessToken = channel.FBAccessToken
resp.Channel = channel.ChannelID resp.Channel = channel.ChannelID
} }

Loading…
Cancel
Save