예제 #1
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="environment"></param>
 /// <param name="merchant"></param>
 /// <param name="serializer">Crie o seu Provider Json</param>
 /// <param name="timeOut">Tempo para TimeOut da requisição, por default é 60 segundos</param>
 public CieloApi(CieloEnvironment environment, Merchant merchant, ISerializerJSON serializer, int timeOut = 60000)
 {
     Environment    = environment;
     Merchant       = merchant;
     SerializerJSON = serializer;
     _timeOut       = timeOut;
 }
예제 #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="environment"></param>
        /// <param name="merchant"></param>
        /// <param name="serializer">Crie o seu Provider Json</param>
        /// <param name="timeOut">Tempo para TimeOut da requisição, por default é 60 segundos</param>
        public CieloApi(CieloEnvironment environment, Merchant merchant, ISerializerJSON serializer, int timeOut = 60000, SecurityProtocolType securityProtocolType = SecurityProtocolType.Tls12)
        {
            Environment    = environment;
            Merchant       = merchant;
            SerializerJSON = serializer;
            _timeOut       = timeOut;

            ServicePointManager.SecurityProtocol = securityProtocolType;
        }