public async Task <JsonResult> EditCustomer(string tenantUid, string title, string firstname, string lastname, string gender, string day, string month, string year, string country, string countrycode, string timezone, string odds, string language, string username, string customerGuid, string customerToken, string address1 = "", string address2 = "", string address3 = "", string town = "", string county = "", string postalcode = "", string notify = "true")
        {
            var customer = new EditCustomer
            {
                Username = username,
                Fields   = new Models.EditCustomer.EditFields
                {
                    CountryCode         = countrycode,
                    DOB                 = !string.IsNullOrEmpty(day) ? $"{year}-{month}-{day}" : string.Empty,
                    FirstName           = firstname,
                    LastName            = lastname,
                    Gender              = gender,
                    LanguageCode        = language,
                    OddsDisplay         = odds,
                    TimeZoneCode        = timezone,
                    Title               = title,
                    AddressLine1        = address1,
                    AddressLine2        = address2,
                    AddressLine3        = address3,
                    County              = county,
                    Town                = town,
                    Country             = country,
                    PostCode            = postalcode,
                    NotificationComPref = notify
                }
            };
            var origin        = TenantHelper.GetCurrentTenantUrl(contentService, tenantUid);
            var key           = ApiKeyCache.GetByTenantUid(tenantUid);
            var authorization = await new Authorization().GetAuthorizationAsync(key);

            var response = await apiService.EditCustomerAsync(customer, tenantUid, origin, customerToken);

            return(Json(response, JsonRequestBehavior.DenyGet));
        }
        public async Task <JsonResult> GetHubConnectionAsync(string userId, string tenantUid, string customerToken)
        {
            var origin   = TenantHelper.GetCurrentTenantUrl(contentService, tenantUid);
            var response = await apiService.GetHubConnectionAsync(userId, origin, customerToken);

            return(Json(response, JsonRequestBehavior.DenyGet));
        }
        public async Task <JsonResult> RefreshToken(string tenantUid, string token)
        {
            var origin   = TenantHelper.GetCurrentTenantUrl(contentService, tenantUid);
            var response = (LoginResponseContent)await apiService.RefreshTokenAsync(tenantUid, origin, token);

            return(Json(response, JsonRequestBehavior.AllowGet));
        }
Exemplo n.º 4
0
        public async Task <JsonResult> VerifyMobileValidateSMS2(string tenantUid, string mobile, string code, string language, string token)
        {
            var origin   = TenantHelper.GetCurrentTenantUrl(contentService, tenantUid);
            var response = await verificationService.ValidateSmsVerificationCodeAsync(tenantUid, origin, mobile, code, token);

            return(Json(response, JsonRequestBehavior.DenyGet));
        }
        public async Task <JsonResult> GetCustomerSummaryAsync(string tenantUid, string customerToken)
        {
            var origin   = TenantHelper.GetCurrentTenantUrl(contentService, tenantUid);
            var response = await apiService.GetCustomerSummaryAsync(tenantUid, origin, LoginSession.DecodeJwtToken(customerToken));

            return(Json(response, JsonRequestBehavior.DenyGet));
        }
        public async Task <JsonResult> Deposit(Deposit deposit, string tenantUid)
        {
            var origin = TenantHelper.GetCurrentTenantUrl(contentService, tenantUid);
            var token  = Request.Cookies["token"].Value;

            if (deposit.PaymentIdentifier == "BTC")
            {
                var response = (DepositBitcoinResponseContent)await _transactionService.DepositBitcoin(tenantUid, token, origin, deposit);

                return(Json(response));
            }
            else
            {
                var response = (DepositPerfectMoneyResponseContent)await _transactionService.Deposit(tenantUid, token, origin, deposit);

                string value;
                var    hasValue = deposit.Parameters.TryGetValue("Amount", out value);
                if (hasValue)
                {
                    Session["t_amount"] = value;
                }
                Session["t_name"] = deposit.PaymentSystemName;
                Session["t_id"]   = response?.Payload?.TransactionId;
                Session["t_date"] = DateTime.Now.ToString();

                return(Json(response));
            }
        }
Exemplo n.º 7
0
        public ActionResult TotalCodeCasinoPageTemplate()
        {
            var model = GetModel <GamePageViewModel>(CurrentPage);

            if (Request.QueryString["gameId"] != null)
            {
                var origin        = TenantHelper.GetCurrentTenantUrl(contentService, model.TenantUid);
                var gameId        = int.Parse(Request.QueryString["gameId"].ToString());
                var key           = ApiKeyCache.GetByTenantUid(model.TenantUid);
                var authorization = GetAuthorization(key);
                var games         = apiService.GetGameDataAnonymousArray(model.TenantUid, origin, authorization: authorization.AccessToken);
                var game          = games.SingleOrDefault(x => x.GameId == gameId);
                if (game != null)
                {
                    model.HasDemoMode = game.DemoEnabled;
                    model.GameUrl     = game.Url;
                }
            }
            else
            {
                model.Slider = CurrentPage.Value <IEnumerable <IPublishedElement> >("gameSlider")
                               .Select(x => new SliderItem
                {
                    Image       = x.HasValue("sliderItemImage") ? x.GetProperty("sliderItemImage").Value <IPublishedContent>().Url : string.Empty,
                    ButtonLabel = x.HasValue("sliderItemButtonLabel") ? x.GetProperty("sliderItemButtonLabel").GetValue().ToString() : string.Empty,
                    Title       = x.HasValue("sliderItemTitle") ? x.GetProperty("sliderItemTitle").GetValue().ToString() : string.Empty,
                    Subtitle    = x.HasValue("sliderItemSubtitle") ? x.GetProperty("sliderItemSubtitle").GetValue().ToString() : string.Empty,
                    Url         = x.HasValue("sliderItemUrl") ? x.GetProperty("sliderItemUrl").GetValue().ToString() : string.Empty,
                })?.ToList();
            }

            model.Category = "casino";
            return(CurrentTemplate(model));
        }
        public async Task <JsonResult> CloseTicket(CloseTicketModel ticket, string tenantUid)
        {
            var token    = Request.Cookies["token"].Value;
            var origin   = TenantHelper.GetCurrentTenantUrl(_contentService, tenantUid);
            var response = await _ticketService.CloseTicket(tenantUid, token, origin, ticket);

            return(Json(response));
        }
        public async Task <JsonResult> LoginForm(string tenantUidForm, string credentialForm, string passwordForm, string rememberMe = "off")
        {
            var origin        = TenantHelper.GetCurrentTenantUrl(contentService, tenantUidForm);
            var key           = ApiKeyCache.GetByTenantUid(tenantUidForm);
            var authorization = await new Authorization().GetAuthorizationAsync(key);
            var response      = await apiService.LoginFormAsync(tenantUidForm, origin, credentialForm, passwordForm, rememberMe, authorization.AccessToken);

            return(Json(response, JsonRequestBehavior.DenyGet));
        }
        public async Task <JsonResult> ChangePasswordViaSms(string tenantUid, string username, string code, string password)
        {
            var origin        = TenantHelper.GetCurrentTenantUrl(contentService, tenantUid);
            var key           = ApiKeyCache.GetByTenantUid(tenantUid);
            var authorization = await new Authorization().GetAuthorizationAsync(key);
            var response      = await apiService.VerifyPasswordResetSmsAsync(tenantUid, origin, username, code, password, authorization.AccessToken);

            return(Json(response, JsonRequestBehavior.DenyGet));
        }
        public async Task <JsonResult> GetAccessToken(string tenantUid)
        {
            var origin        = TenantHelper.GetCurrentTenantUrl(contentService, tenantUid);
            var key           = ApiKeyCache.GetByTenantUid(tenantUid);
            var authorization = await new Authorization().GetAuthorizationAsync(key);
            var response      = authorization.AccessToken;

            return(Json(response, JsonRequestBehavior.DenyGet));
        }
        public async Task <JsonResult> GetCustomerEmail(string tenantUid, string customerGuid)
        {
            var origin        = TenantHelper.GetCurrentTenantUrl(contentService, tenantUid);
            var key           = ApiKeyCache.GetByTenantUid(tenantUid);
            var authorization = await new Authorization().GetAuthorizationAsync(key);
            var response      = apiService.GetCustomerEmail(tenantUid, origin, customerGuid, authorization.AccessToken);

            return(Json(response, JsonRequestBehavior.AllowGet));
        }
        public async Task <JsonResult> WithdrawBitcoin(WithdrawBitcoin withdrawBitcoin, string tenantUid)
        {
            var origin = TenantHelper.GetCurrentTenantUrl(contentService, tenantUid);
            var token  = Request.Cookies["token"].Value;

            var response = (WithdrawResponseContent)await _transactionService.WithdrawBitcoin(tenantUid, token, origin, withdrawBitcoin);

            return(Json(response));
        }
Exemplo n.º 14
0
        public async Task <JsonResult> VerifyMobileValidateSMS(string tenantUid, string mobile, string code, string language)
        {
            var origin        = TenantHelper.GetCurrentTenantUrl(contentService, tenantUid);
            var key           = ApiKeyCache.GetByTenantUid(tenantUid);
            var authorization = await new Authorization().GetAuthorizationAsync(key);
            var response      = await verificationService.ValidateSmsVerificationCodeAsync(tenantUid, origin, mobile, code, authorization.AccessToken);

            return(Json(response, JsonRequestBehavior.DenyGet));
        }
Exemplo n.º 15
0
        public async Task <JsonResult> GetCards(string tenantUid)
        {
            var origin = TenantHelper.GetCurrentTenantUrl(_contentService, tenantUid);
            var token  = Request.Cookies["token"].Value;

            var response = await _cardService.GetCards(tenantUid, token, origin);

            return(Json(response, JsonRequestBehavior.AllowGet));
        }
        public async Task <JsonResult> CancelWithdrawal(string transactionGuid, string tenantUid)
        {
            var origin = TenantHelper.GetCurrentTenantUrl(contentService, tenantUid);
            var token  = Request.Cookies["token"].Value;

            var response = (CancelWithdrawalResponseContent)await _transactionHistoryService.CancelWithdrawal(tenantUid, token, origin, transactionGuid);

            return(Json(response));
        }
        public async Task <JsonResult> BonusTransaction(BonusTransaction bonusTransaction, string tenantUid)
        {
            var origin = TenantHelper.GetCurrentTenantUrl(contentService, tenantUid);
            var token  = Request.Cookies["token"].Value;

            var response = (BonusTransactionResponseContent)await _transactionHistoryService.BonusTransaction(tenantUid, token, origin, bonusTransaction);

            return(Json(response));
        }
        public async Task <JsonResult> CreateMessage(CreateMessageModel message, string tenantUid)
        {
            var token  = Request.Cookies["token"].Value;
            var origin = TenantHelper.GetCurrentTenantUrl(_contentService, tenantUid);

            var response = await _ticketService.CreateMessage(tenantUid, token, origin, message.TicketId, message.EmailAddress, message.MessageText, message.Attachment);

            return(Json(response));
        }
        public async Task <JsonResult> ForgotUsernameEmail(string tenantUid, string email, string language)
        {
            var origin        = TenantHelper.GetCurrentTenantUrl(contentService, tenantUid);
            var key           = ApiKeyCache.GetByTenantUid(tenantUid);
            var authorization = await new Authorization().GetAuthorizationAsync(key);
            var response      = await apiService.ForgotUsernameEmailAsync(tenantUid, origin, email, language, authorization.AccessToken);

            return(Json(response, JsonRequestBehavior.DenyGet));
        }
        public async Task <JsonResult> GetGameGrid(string tenantUid, string category = "", string subCategory = "", string provider = "", string keyword = "", string languageCode = "")
        {
            var origin        = TenantHelper.GetCurrentTenantUrl(contentService, tenantUid);
            var key           = ApiKeyCache.GetByTenantUid(tenantUid);
            var authorization = await new Authorization().GetAuthorizationAsync(key);
            var response      = await _gameService.GetGameDataAnonymousArrayAsync(tenantUid, origin, category, subCategory, provider, keyword, languageCode, authorization.AccessToken);

            return(Json(response, JsonRequestBehavior.DenyGet));
        }
        public async Task <ActionResult> Index()
        {
            var model = GetModel <DepositBankPageViewModel>(CurrentPage);

            if (string.IsNullOrEmpty(model.Token))
            {
                return(Redirect("/?login=y"));
            }

            List <Card> cards = new List <Card>();

            var origin = TenantHelper.GetCurrentTenantUrl(_contentService, model.TenantUid);
            var activeCardsResponse = (ActiveCardResponseContent)await _cardService.ActiveCards(model.TenantUid, model.Token, origin, "Deposit");

            var activeCards = activeCardsResponse?.Payload?.ActiveCards.ToList();

            foreach (var activeCard in activeCards)
            {
                activeCard.Status = "Active";
                if (!string.IsNullOrEmpty(activeCard.Iban) && activeCard.Iban.Length > 8)
                {
                    var first4 = activeCard.Iban.Substring(0, 4);
                    var x      = activeCard.Iban.Length - 8;
                    var xs     = string.Empty;
                    for (int i = 0; i < x; i++)
                    {
                        xs += "X";
                    }
                    var last4 = activeCard.Iban.Substring(activeCard.Iban.Length - 4);
                    activeCard.Iban = first4 + xs + last4;
                }
            }

            cards.AddRange(activeCards);

            var allCardsResponse = (GetCardResponseContent)await _cardService.GetCards(model.TenantUid, model.Token, origin);

            var allCards = allCardsResponse?.Payload;

            if (allCards != null && allCards.Any())
            {
                foreach (var card in allCards.Where(card => card.Status != "Active"))
                {
                    cards.Add(new Card
                    {
                        CustomerGuid = card.CustomerGuid,
                        CardNumber   = card.CardNumber,
                        Status       = card.Status
                    });
                }
            }

            model.Cards = cards;

            return(CurrentTemplate(model));
        }
Exemplo n.º 22
0
        public async Task <JsonResult> VerifyMobileSendSMS(string tenantUid, string countryCode, string mobile, string language)
        {
            var origin        = TenantHelper.GetCurrentTenantUrl(contentService, tenantUid);
            var key           = ApiKeyCache.GetByTenantUid(tenantUid);
            var authorization = await new Authorization().GetAuthorizationAsync(key);
            var mobileNumber  = $"{countryCode}{mobile.TrimStart(new Char[] { '0' })}";
            var response      = await verificationService.VerifyMobileAsync(tenantUid.ToString(), origin, mobileNumber, language, authorization.AccessToken);

            return(Json(response, JsonRequestBehavior.DenyGet));
        }
Exemplo n.º 23
0
        public async Task <JsonResult> VerifyEmailReSendCode(string tenantUid, string id, string email, string language)
        {
            var origin          = TenantHelper.GetCurrentTenantUrl(contentService, tenantUid);
            var key             = ApiKeyCache.GetByTenantUid(tenantUid);
            var authorization   = await new Authorization().GetAuthorizationAsync(key);
            var verificationUrl = helper.GetConfirmVerificationUrl(tenantUid, origin, email, language, id);
            var response        = await verificationService.VerificationEmailAsync(tenantUid.ToString(), origin, verificationUrl, email, language, authorization.AccessToken);

            return(Json(response, JsonRequestBehavior.DenyGet));
        }
        public async Task <JsonResult> CreateTicketAnonymous(CreateTicketAnonymousModel ticket, string tenantUid)
        {
            var origin        = TenantHelper.GetCurrentTenantUrl(_contentService, tenantUid);
            var key           = ApiKeyCache.GetByTenantUid(tenantUid);
            var authorization = await new Authorization().GetAuthorizationAsync(key);

            var response = await _ticketService.CreateTicketAnonymous(tenantUid, authorization.AccessToken, origin, ticket);

            return(Json(response));
        }
        public async Task <JsonResult> GetCustomer(string tenantUid, string username, string customerToken)
        {
            var origin        = TenantHelper.GetCurrentTenantUrl(contentService, tenantUid);
            var key           = ApiKeyCache.GetByTenantUid(tenantUid);
            var authorization = await new Authorization().GetAuthorizationAsync(key);

            var response = await apiService.GetCustomerInfoAsync(tenantUid, origin, username, customerToken);

            return(Json(response, JsonRequestBehavior.DenyGet));
        }
        public async Task <JsonResult> ForgotPasswordSendEmail(string tenantUid, string email, string username, string language, string requestUrl)
        {
            var origin          = TenantHelper.GetCurrentTenantUrl(contentService, tenantUid);
            var key             = ApiKeyCache.GetByTenantUid(tenantUid);
            var authorization   = await new Authorization().GetAuthorizationAsync(key);
            var verificationUrl = helper.GetResetPasswordVerificationUrl(tenantUid, requestUrl, username, language);
            var response        = await apiService.SendPasswordEmailAsync(tenantUid, origin, username, email, language, verificationUrl.ToString(), authorization.AccessToken);

            return(Json(response, JsonRequestBehavior.DenyGet));
        }
        public async Task <JsonResult> ForgotUsernameSms(string tenantUid, string countryCode, string mobile, string language)
        {
            var origin        = TenantHelper.GetCurrentTenantUrl(contentService, tenantUid);
            var key           = ApiKeyCache.GetByTenantUid(tenantUid);
            var authorization = await new Authorization().GetAuthorizationAsync(key);
            var mobileNumber  = $"{countryCode}{mobile}";
            var response      = await apiService.ForgotUsernameSmsAsync(tenantUid, origin, mobileNumber, language, authorization.AccessToken);

            return(Json(response, JsonRequestBehavior.DenyGet));
        }
Exemplo n.º 28
0
        public async Task <ActionResult> Index()
        {
            var model   = GetModel <TicketsPageViewModel>(CurrentPage);
            var origin  = TenantHelper.GetCurrentTenantUrl(_contentService, model.TenantUid);
            var tickets = (TicketSearchResponseContent)await _ticketService.GetTickets(model.TenantUid, model.Token, origin);

            model.Tickets         = tickets.Result;
            model.HasActiveTicket = model.Tickets != null && model.Tickets.Any(ticket => ticket.ClosedDate == null);

            return(CurrentTemplate(model));
        }
Exemplo n.º 29
0
        public async Task <ActionResult> Index(int id, bool openReply = false)
        {
            var model  = GetModel <TicketPageViewModel>(CurrentPage);
            var origin = TenantHelper.GetCurrentTenantUrl(_contentService, model.TenantUid);

            model.Ticket    = ((TicketResponseContent)await _ticketService.GetTicket(model.TenantUid, model.Token, origin, id)).Result;
            model.IsActive  = model.Ticket?.ClosedDate == null;
            model.OpenReply = openReply;

            return(CurrentTemplate(model));
        }
        public async Task <ActionResult> GetMessagesForTicket(string tenantUid, int id, string language, string messageText, bool isActive)
        {
            var origin = TenantHelper.GetCurrentTenantUrl(_contentService, tenantUid);
            var token  = Request.Cookies["token"].Value;
            var ticket = ((TicketResponseContent)await _ticketService.GetTicket(tenantUid, token, origin, id)).Result;

            ViewData["currentLanguage"] = language;
            ViewData["NewMessageText"]  = messageText;
            ViewData["IsActive"]        = isActive;

            return(PartialView("_TotalCodeTicketMessageList", ticket.TicketResponseMessages));
        }