ShopPlaceBets

From BetgamesTV
Jump to navigation Jump to search

Method is called when cashier tries to accept some bets.

Inputs:

  • token (string) - current token.
  • bets - array of bets.

Bet structure:

  • BetOddId (int) - odd id.
  • BetOddValue (int) - odd value in "cents".
  • BetAmount (int) - bet amount in "cents".
  • BetCurrency (string) - bet currencty code, return value received from settings.
  • BetItems (array of bet item ids (int) selected) - array of items selected.
  • BetRepeats (int) - currently not used. Send 0.

Outputs:

  • TicketBarcode (string) - unique ticket id. Should be printed on ticket in CODE39 format for easier ticket identification lately.
  • TicketErrors (string array) - array of error stirngs, in case when bets were not accepted for some reason.
  • TicketLottery (int) - game id. You should print lottery name that you received before in ShopGetLotteries method.
  • TicketRuns (array of ticket runs) - array size matches count of bets which have been made. This information should be printed on ticket near each bet.
  • TicketRunTime (dateTime) - not needed.
  • TicketRunCode (string) - not needed.
  • TicketTime (dateTime) - time when ticket was accepted. This value should be printed on ticket.

Ticket Run structure:

  • RunCode (string) - code of the draw, for which the bet has been accepted.
  • RunTime (dateTime) - time of the draw, for which the bet has been accepted.