Example #1
0
 public static ITicketCashout GetTicketCashout(string ticketId = null)
 {
     if (string.IsNullOrEmpty(ticketId))
     {
         ticketId = "ticket-" + SR.I1000P;
     }
     return(BuilderFactory.CreateTicketCashoutBuilder().SetTicketId(ticketId).SetBookmakerId(SR.I1000).SetCashoutStake(SR.I1000P).BuildTicket());
 }
Example #2
0
        private void HandleTicketResponse(ITicketResponse ticketResponse)
        {
            _log.LogInformation($"Ticket '{ticketResponse.TicketId}' response is {ticketResponse.Status}. Reason={ticketResponse.Reason?.Message}");
            if (ticketResponse.Status == TicketAcceptance.Accepted)
            {
                //required only if 'explicit acking' is enabled in MTS admin
                ticketResponse.Acknowledge();

                // handle ticket response

                //if for some reason we want to cashout ticket, this is how we can do it
                var ticketCashout = _factory.CreateTicketCashoutBuilder().SetTicketId(ticketResponse.TicketId).SetCashoutStake(12932).BuildTicket();
                _mtsSdk.SendTicket(ticketCashout);
            }
        }