|
|
|
|
@ -50,18 +50,24 @@ func (s *Sub) EnterGame() string { |
|
|
|
|
"X-Game-Timestamp": strconv.FormatInt(timestamp, 10), |
|
|
|
|
"Content-Type": "application/json;charset=UTF-8", |
|
|
|
|
} |
|
|
|
|
rechargeInfo := call.GetRechargeInfo(uid) |
|
|
|
|
balance := call.GetUserCurrency(uid, common.CurrencyINR) |
|
|
|
|
playerProfile := call.GetPlayerProfileByCurrency(uid, common.CurrencyINR) |
|
|
|
|
// Generate sign
|
|
|
|
|
game := call.GetConfigGameListByID(providerID, gameID) |
|
|
|
|
if game == nil { |
|
|
|
|
return "" |
|
|
|
|
} |
|
|
|
|
request := EnterGameRequest{ |
|
|
|
|
Uname: common.GetProviderUserName(fmt.Sprintf("%d", uid)), |
|
|
|
|
GameID: game.GameCode, |
|
|
|
|
Token: common.GetProviderUserToken(token), |
|
|
|
|
Lang: "pt", |
|
|
|
|
Nick: "", |
|
|
|
|
RtpPool: rtp, |
|
|
|
|
Uname: common.GetProviderUserName(fmt.Sprintf("%d", uid)), |
|
|
|
|
GameID: game.GameCode, |
|
|
|
|
Token: common.GetProviderUserToken(token), |
|
|
|
|
Lang: "pt", |
|
|
|
|
Nick: "", |
|
|
|
|
TotalRecharge: rechargeInfo.TotalRecharge / common.DecimalDigits, |
|
|
|
|
TotalWithdraw: (rechargeInfo.TotalWithdraw + rechargeInfo.TotalWithdrawing) / common.DecimalDigits, |
|
|
|
|
TotalBet: playerProfile.TotalBet / common.DecimalDigits, |
|
|
|
|
Balance: balance / common.DecimalDigits, |
|
|
|
|
} |
|
|
|
|
body, _ := json.Marshal(request) |
|
|
|
|
sign := GenerateSign(string(body), timestamp, key) |
|
|
|
|
|