private ValidateTokenResponse ValidateToken(string token) { if (String.IsNullOrWhiteSpace(token)) { throw new WebServiceException("Access denied (missing token)"); } EnsureAccessToken(); var response = GameApiUtil.CallGameApiPost <ValidateToken, ValidateTokenResponse>( FormatEndpointPath("token/validate"), new ValidateToken() { AuthToken = token, PlayerIpAddress = Request.UserHostAddress }, OAuthHeaderDecoration); if (response.ErrorCode != 0) { throw new WebServiceException( $"Access denied (invalid token), Error Code: {response.ErrorCode}, description: {response.ErrorDescription}"); } return(response); }
private ValidateTokenResponse ValidateToken(string token) { return(GameApiUtil.CallGameApiPost <ValidateToken, ValidateTokenResponse>( "api/secure/token/validate", new ValidateToken() { AuthToken = token, PlayerIpAddress = Request.UserHostAddress }, OAuthHeaderDecoration)); }
private CancelTransactionResponse CallCancelTransaction(string token, List <BetCommandTransactionRequest> txList) { return(GameApiUtil.CallGameApiPost <CancelTransaction, CancelTransactionResponse>( FormatEndpointPath("transactions/cancel"), new CancelTransaction { AuthToken = token, PlayerIpAddress = Request.UserHostAddress, Transactions = txList }, OAuthHeaderDecoration)); }
private FreeBetResponse CallFreeBet(string token, string betLimitId, List <BetCommandTransactionRequest> txList) { return(GameApiUtil.CallGameApiPost <FreeBet, FreeBetResponse>( FormatEndpointPath("bets/freebet"), new FreeBet { AuthToken = token, PlayerIpAddress = Request.UserHostAddress, Transactions = txList }, OAuthHeaderDecoration)); }
private LoseBetResponse CallLoseBet(string token, List <BetCommandTransactionRequest> txList) { return(GameApiUtil.CallGameApiPost <LoseBet, LoseBetResponse>( FormatEndpointPath("bets/lose"), new LoseBet { AuthToken = token, PlayerIpAddress = Request.UserHostAddress, Transactions = txList }, OAuthHeaderDecoration)); }
private PlaceBetResponse CallPlaceBet(string token, string betLimitId, List <BetCommandTransactionRequest> txList) { ValidateBetLimits(betLimitId, txList); return(GameApiUtil.CallGameApiPost <PlaceBet, PlaceBetResponse>( FormatEndpointPath("bets/place"), new PlaceBet { AuthToken = token, PlayerIpAddress = Request.UserHostAddress, Transactions = txList }, OAuthHeaderDecoration)); }