Exemplo n.º 1
0
        public DecidirConnector(int ambiente, string privateApiKey, string publicApiKey)
        {
            this.ambiente      = ambiente;
            this.privateApiKey = privateApiKey;
            this.publicApiKey  = publicApiKey;

            if (ambiente == Ambiente.AMBIENTE_PRODUCCION)
            {
                this.endpoint = endPointProduction;
            }
            else
            {
                this.endpoint = endPointSandbox;
            }

            this.healthCheckService = new HealthCheck(this.endpoint);
            this.paymentService     = new Payments(this.endpoint, this.privateApiKey);
            this.userSiteService    = new UserSite(this.endpoint, this.privateApiKey);
            this.cardTokensService  = new CardTokens(this.endpoint, this.privateApiKey);
        }
Exemplo n.º 2
0
        private void init(int ambiente, string privateApiKey, string publicApiKey, string validateApiKey, string merchant)
        {
            this.privateApiKey  = privateApiKey;
            this.publicApiKey   = publicApiKey;
            this.validateApiKey = validateApiKey;
            this.merchant       = merchant;

            if (ambiente == Ambiente.AMBIENTE_PRODUCCION)
            {
                this.endpoint     = endPointProduction;
                this.request_host = request_host_production;
            }
            else if (ambiente == Ambiente.AMBIENTE_SANDBOX)
            {
                this.endpoint     = endPointSandbox;
                this.request_host = request_host_sandbox;
            }

            this.healthCheckService = new HealthCheck(this.endpoint);
            this.paymentService     = new Payments(this.endpoint, this.privateApiKey, this.validateApiKey, this.merchant, this.request_host, this.publicApiKey);
            this.userSiteService    = new UserSite(this.endpoint, this.privateApiKey);
            this.cardTokensService  = new CardTokens(this.endpoint, this.privateApiKey);
        }
Exemplo n.º 3
0
 public IActionResult SetCard([FromBody] CardTokens cardTokens)
 {
     _lobbyManager.SetCard(cardTokens.Card, cardTokens.Tokens.PlayerToken, cardTokens.Tokens.LobbyToken);
     return(Ok());
 }